Record status edition added.
[fa-stable.git] / sales / includes / db / sales_order_db.inc
index cbefe7aa09994fa82699e39be027b64a3d44cfcc..ef66b0b7d72166792bb172c49be19cbe4d26fa46 100644 (file)
@@ -1,5 +1,14 @@
 <?php
-
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       Released under the terms of the GNU General Public License, GPL, 
+       as published by the Free Software Foundation, either version 3 
+       of the License, or (at your option) any later version.
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
+***********************************************************************/
 //----------------------------------------------------------------------------------------
 function get_demand_qty($stockid, $location)
 {
@@ -425,7 +434,7 @@ function get_invoice_duedate($debtorno, $invdate)
 {
        if (!is_date($invdate))
        {
-               return Today();
+               return new_doc_date();
        }
        $sql = "SELECT ".TB_PREF."debtors_master.debtor_no, ".TB_PREF."debtors_master.payment_terms, ".TB_PREF."payment_terms.* FROM ".TB_PREF."debtors_master,
                ".TB_PREF."payment_terms WHERE ".TB_PREF."debtors_master.payment_terms = ".TB_PREF."payment_terms.terms_indicator AND