Fixed [0000087] (price always updated after order date change)
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Tue, 25 Nov 2008 15:11:24 +0000 (15:11 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Tue, 25 Nov 2008 15:11:24 +0000 (15:11 +0000)
sales/includes/ui/sales_credit_ui.inc
sales/includes/ui/sales_order_ui.inc

index be4adbf3060af84870e41abb06245b1d856f8830..5af7227b940795a28191dd71b08bf47707169218 100644 (file)
@@ -113,7 +113,10 @@ function display_credit_header(&$order)
 
        date_row(_("Date:"), 'OrderDate', '', null, 0, 0, 0, null, true);
        if (isset($_POST['_OrderDate_changed'])) {
-               $change_prices = 1;
+               if (!is_company_currency($order->customer_currency) 
+                       && (get_base_sales_type()>0)) {
+                               $change_prices = 1;
+               }
                $Ajax->activate('currency');
        }
     shippers_list_row(_("Shipping Company:"), 'ShipperID', $order->ship_via);
index 2b2b028465ea5d045677f52ec424a38fa8f3bd29..e9fd0a8f51a69f290f6b57d60c1d355a9807e272 100644 (file)
@@ -281,7 +281,10 @@ function display_order_header(&$order, $editable, $date_text, $display_tax_group
                date_row($date_text, 'OrderDate',
                  _('Date of order receive'), null, 0, 0, 0, null, true);
                if (isset($_POST['_OrderDate_changed'])) {
-                       $change_prices = 1;
+                       if (!is_company_currency($order->customer_currency) 
+                               && (get_base_sales_type()>0)) {
+                                       $change_prices = 1;
+                       }
                        $Ajax->activate('currency');
                        if ($order->trans_type == 10) {
                                $_POST['delivery_date'] = get_invoice_duedate(get_post('customer_id'), get_post('OrderDate'));