Payment terms related functions moved to separate file, common function for calculati...
[fa-stable.git] / sales / includes / db / recurrent_invoices_db.inc
index 5529d0c28fd0544fa7c86ea6e8e48185a6e200ee..7aca37cf46f21723a8537e682effbe926b4de997 100644 (file)
@@ -194,7 +194,7 @@ function create_template_invoice($customer_id, $branch_id, $order_no, $tmpl_no,
        $doc->trans_no = 0;
        $doc->document_date = $date;
 
-       $doc->due_date = get_invoice_duedate($doc->payment, $doc->document_date);
+       $doc->due_date = get_payment_due_date($doc->payment, $doc->document_date);
 
        $doc->reference = $Refs->get_next($doc->trans_type, null, array('customer' => $customer_id, 'branch' => $branch_id,
                'date' => $date));