From 5df17388e33c48c24351b7b1ba5ce47b95edb8ea Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Thu, 22 Jan 2009 16:28:11 +0000 Subject: [PATCH] Allocation bug for cash sales. --- sales/includes/db/sales_invoice_db.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sales/includes/db/sales_invoice_db.inc b/sales/includes/db/sales_invoice_db.inc index 1c9837f9..d783ac9a 100644 --- a/sales/includes/db/sales_invoice_db.inc +++ b/sales/includes/db/sales_invoice_db.inc @@ -167,6 +167,9 @@ function write_sales_invoice(&$invoice) references::get_next(12), $amount-$discount, $discount, _('Cash invoice').' '.$invoice->trans_no); add_cust_allocation($amount, 12, $pmtno, 10, $invoice_no); + + update_debtor_trans_allocation(10, $invoice_no, $amount); + update_debtor_trans_allocation(12, $pmtno, $amount); } } commit_transaction(); -- 2.30.2