Merged changes from mai trunk up to 2.3.1
[fa-stable.git] / admin / void_transaction.php
index d91c53d0923c470b619dc9f66813f9ed56fdfb73..951a7f87e03bda13c31a341ce4d6460590084de9 100644 (file)
@@ -139,15 +139,19 @@ function ref_view($row)
 function voiding_controls()
 {
        global $selected_id;
+
+       $not_implemented =  array(ST_PURCHORDER, ST_SUPPRECEIVE, ST_SALESORDER, 
+               ST_SALESQUOTE, ST_COSTUPDATE);
+
        start_form();
 
     start_table(TABLESTYLE_NOBORDER);
        start_row();
 
-       systypes_list_cells(_("Transaction Type:"), 'filterType', null, true);
+       systypes_list_cells(_("Transaction Type:"), 'filterType', null, true, $not_implemented);
        if (list_updated('filterType'))
                $selected_id = -1;
-
+               
        end_row();
     end_table(1);
     
@@ -163,9 +167,6 @@ function voiding_controls()
                _("GL") => array('insert'=>true, 'fun'=>'gl_view'),
                _("Select") => array('insert'=>true, 'fun'=>'select_link') 
        );
-       if(!$trans_ref) {
-               array_remove($cols, 1);
-       }
 
        $table =& new_db_pager('transactions', $sql, $cols);
        $table->width = "40%";
@@ -173,17 +174,17 @@ function voiding_controls()
 
        start_table(TABLESTYLE2);
 
-       //systypes_list_row(_("Transaction Type:"), "filterType", null, true);
-       
        if ($selected_id != -1)
        {
-               $_POST['trans_no'] = $selected_id;
+               hidden('trans_no', $selected_id);
                hidden('selected_id', $selected_id);
        }
        else
-               $_POST['trans_no'] = '';
-               
-    text_row(_("Transaction #:"), 'trans_no', null, 12, 12);
+       {
+               hidden('trans_no', '');
+               $_POST['memo_'] = '';
+       }       
+    label_row(_("Transaction #:"), ($selected_id==-1?'':$selected_id));
 
     date_row(_("Voiding Date:"), 'date_');