X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fsales_order_entry.php;h=dad3c63c1e846014e232a26c246676a1dd59a384;hb=5ea101caa9cd7c477f64a069a13af9959be2f42c;hp=07f51d3bacaeb4890c7da93eea8b70ec9f5437e5;hpb=e6bdb5d750ba341d3a74bbe15e88abdb99fa2401;p=fa-stable.git diff --git a/sales/sales_order_entry.php b/sales/sales_order_entry.php index 07f51d3b..dad3c63c 100644 --- a/sales/sales_order_entry.php +++ b/sales/sales_order_entry.php @@ -453,6 +453,10 @@ function can_process() { display_error("Invoice total amount cannot be less than zero."); return false; } + + if ($_SESSION['Items']->payment_terms['cash_sale'] && + ($_SESSION['Items']->trans_type == ST_CUSTDELIVERY || $_SESSION['Items']->trans_type == ST_SALESINVOICE)) + $_SESSION['Items']->due_date = $_SESSION['Items']->document_date; return true; }