Fixed handling extended journal entries in various places.
[fa-stable.git] / sales / includes / db / sales_invoice_db.inc
index 73338a4144a702e02f3a4214d7774d3db0934af1..d2b97cf2fbc29750ed9dc31088ad020095ce739b 100644 (file)
@@ -199,8 +199,8 @@ function write_sales_invoice(&$invoice)
                                _('Cash invoice').' '.$invoice_no);
                        add_cust_allocation($amount, ST_CUSTPAYMENT, $pmtno, ST_SALESINVOICE, $invoice_no, $invoice->customer_id, $date_);
 
-                       update_debtor_trans_allocation(ST_SALESINVOICE, $invoice_no);
-                       update_debtor_trans_allocation(ST_CUSTPAYMENT, $pmtno);
+                       update_debtor_trans_allocation(ST_SALESINVOICE, $invoice_no, $invoice->customer_id);
+                       update_debtor_trans_allocation(ST_CUSTPAYMENT, $pmtno, $invoice->customer_id);
                }
        }
 //_vd($allocs);