Small fix for Template Invoice in sales_order_entry.php on line 363 (duedate for...
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 10 Mar 2008 22:48:46 +0000 (22:48 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 10 Mar 2008 22:48:46 +0000 (22:48 +0000)
CHANGELOG.txt
sales/sales_order_entry.php

index 17a638f40224bc961cc9adccbbcb2057bcb32654..c8a3f1014f1362cc18a7cbd82e6309f80aa3183b 100644 (file)
@@ -19,6 +19,10 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+10-Mar-2008 Joe Hunt
+ # Small fix for Template Invoice in sales_order_entry.php on line 363 (duedate for Invoice).
+ $ /sales/sales_order_entry.php
 10-Mar-2008 Janusz Dobrowolski
  + Added price list selector to sales entry (debtor_master gives only default one)
  + Added optional submit_on_change parameter to sales ui lists
index 1b204354a7fc05ffeb6bc3957202685ac9c80209..780f26cf08c7386abfea9a351d3b653cfc98c4b3 100644 (file)
@@ -360,8 +360,10 @@ function create_cart($type, $trans_no)
                $doc = new Cart(30, array($trans_no));
                $doc->trans_type = $type;
                $doc->trans_no = 0;
-
-               $doc->due_date = $doc->document_date = Today();
+               if ($type == 10)
+                       $doc->due_date = get_invoice_duedate($doc->customer_id, $doc->document_date);
+               else
+                       $doc->due_date = $doc->document_date = Today();
                $doc->reference = references::get_next($doc->trans_type);
                $doc->Comments='';
                foreach($doc->line_items as $line_no => $line) {