From: Joe Hunt Date: Sun, 24 Mar 2019 17:02:00 +0000 (+0100) Subject: Fixing bug in Sales Invoice and Sales Delivery when Cash Sales and document date... X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=b8ca787d4997e98d29af963f9e23534796381c44 Fixing bug in Sales Invoice and Sales Delivery when Cash Sales and document date is earlier then todays date. Due date should be the same. --- diff --git a/sales/sales_order_entry.php b/sales/sales_order_entry.php index 07f51d3b..9d87d935 100644 --- a/sales/sales_order_entry.php +++ b/sales/sales_order_entry.php @@ -453,6 +453,9 @@ function can_process() { display_error("Invoice total amount cannot be less than zero."); return false; } + + if ($_SESSION['Items']->payment_terms['cash_sale']) + $_SESSION['Items']->due_date = $_SESSION['Items']->document_date; return true; }