From: Joe Hunt Date: Thu, 19 Jun 2008 14:06:34 +0000 (+0000) Subject: changed so the due date is automatic updated when changing customer in direct invoice. X-Git-Tag: v2.4.2~19^2~2004 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=e501d3036f66f06735a98753acd9cad0393e1dd7;p=fa-stable.git changed so the due date is automatic updated when changing customer in direct invoice. --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index bd3e45fc..d2962f2f 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,10 @@ Legend: ! -> Note $ -> Affected files +19-Jun-2008 Joe Hunt +! changed so the due date is updated when changing customer in direct invoice. +$ /sales/includes/ui/sales_order_ui.inc + 19-Jun-2008 Joe Hunt # Minor layout bug at Credit Shipping Costs in customer_credit_invoice.php $ /sales/customer_credit_invoice.php diff --git a/sales/includes/ui/sales_order_ui.inc b/sales/includes/ui/sales_order_ui.inc index f836a020..3b0489e3 100644 --- a/sales/includes/ui/sales_order_ui.inc +++ b/sales/includes/ui/sales_order_ui.inc @@ -62,6 +62,8 @@ function get_customer_details_to_order(&$order, $customer_id, $branch_id) $order->set_location($myrow["default_location"], $myrow["location_name"]); $order->set_delivery($myrow["default_ship_via"], $myrow["br_name"], $address); + if ($order->trans_type == 10) + $order->due_date = get_invoice_duedate($customer_id, $order->document_date); } return $ret_error; @@ -203,6 +205,11 @@ function display_order_header(&$order, $editable, $date_text, $display_tax_group $_POST['deliver_to'] = $order->deliver_to; $_POST['delivery_address'] = $order->delivery_address; $_POST['phone'] = $order->phone; + if ($order->trans_type == 10) + { + $_POST['delivery_date'] = $order->due_date; + $Ajax->activate('delivery_date'); + } $Ajax->activate('Location'); $Ajax->activate('deliver_to'); $Ajax->activate('phone');