[0000071] Ordering from customer on hold was possible after double
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Tue, 7 Oct 2008 08:29:29 +0000 (08:29 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Tue, 7 Oct 2008 08:29:29 +0000 (08:29 +0000)
exact search in list.

CHANGELOG.txt
sales/includes/ui/sales_order_ui.inc

index b5396a5b718325565af0ff0e4bd50a7fd7c1efa6..74f79985f6e5f0c99cff0c333cad0adc9d9de8e3 100644 (file)
@@ -19,6 +19,10 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+08-Oct-2008 Janusz Dobrowolski
+# [0000071] Ordering from customer on hold was possible after double exact search in list.
+$ /sales/includes/ui/sales_order_ui.inc
+
 ------------------------------- Release 2.0.3 --------------------------------------------
 07-Oct-2008 Joe Hunt
 ! Release 2.0.3
index e2c004abb09d44221551079a7a8d06d6ac4b960b..2b2b028465ea5d045677f52ec424a38fa8f3bd29 100644 (file)
@@ -182,6 +182,10 @@ function display_order_header(&$order, $editable, $date_text, $display_tax_group
                customer_branches_list_row(_("Branch:"),
                  $_POST['customer_id'], 'branch_id', null, false, true, true);
 
+       if( ($order->customer_id != get_post('customer_id', -1)) ||
+                       ($order->Branch != get_post('branch_id', -1)) ||
+                       list_updated('customer_id')) {
+
                if (!isset($_POST['branch_id']) || $_POST['branch_id'] == "")
                {
                        // ignore errors on customer search box call
@@ -193,8 +197,6 @@ function display_order_header(&$order, $editable, $date_text, $display_tax_group
                    $order->Branch = 0;
                } else
                {
-               if( ($order->customer_id != get_post('customer_id', -1)) ||
-                       ($order->Branch != get_post('branch_id', -1))) {
 
                                $old_order = (PHP_VERSION<5) ? $order : clone( $order );
                                $customer_error = get_customer_details_to_order($order, $_POST['customer_id'], $_POST['branch_id']);
@@ -225,8 +227,8 @@ function display_order_header(&$order, $editable, $date_text, $display_tax_group
                                }
                                unset($old_order);
                        }
-               } // changed branch
                set_global_customer($_POST['customer_id']);
+               } // changed branch
        }
 
        if ($_SESSION['Items']->trans_type!=30) {