Rep109 in Print Profiles fixed by @rafat.
[fa-stable.git] / sales / sales_order_entry.php
index 07f51d3bacaeb4890c7da93eea8b70ec9f5437e5..dad3c63c1e846014e232a26c246676a1dd59a384 100644 (file)
@@ -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;
 }