From f0963e80c93412f89ecb8b50974e29cadba31808 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Tue, 7 Oct 2008 08:29:29 +0000 Subject: [PATCH] [0000071] Ordering from customer on hold was possible after double exact search in list. --- CHANGELOG.txt | 4 ++++ sales/includes/ui/sales_order_ui.inc | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b5396a5b..74f79985 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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 diff --git a/sales/includes/ui/sales_order_ui.inc b/sales/includes/ui/sales_order_ui.inc index e2c004ab..2b2b0284 100644 --- a/sales/includes/ui/sales_order_ui.inc +++ b/sales/includes/ui/sales_order_ui.inc @@ -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) { -- 2.30.2