Rerun of sales_order_entry.php.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 24 Mar 2019 17:07:25 +0000 (18:07 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 24 Mar 2019 17:07:25 +0000 (18:07 +0100)
sales/sales_order_entry.php

index 9d87d93558b59985ccdb8ab20c5b3a136f7a9036..dad3c63c1e846014e232a26c246676a1dd59a384 100644 (file)
@@ -454,7 +454,8 @@ function can_process() {
                return false;
        }
 
-       if ($_SESSION['Items']->payment_terms['cash_sale']) 
+       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;
 }