From 79c824f8771d32f5333060d8a61cd580bc22d703 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Sun, 18 May 2008 09:17:26 +0000 Subject: [PATCH] Bug when inserting new records in debtor_trans --- CHANGELOG.txt | 4 ++++ sales/includes/db/cust_trans_db.inc | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 5968fe9b..e098686a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,10 @@ Legend: ! -> Note $ -> Affected files +18-May-2008 Joe Hunt +# Bug when inserting new records in debtor_trans. +$ /sales/includes/db/cust_trans_db.inc + 16-May-2008 Janusz Dobrowolski + Rewritten errors/messages handling, unified for ajax/user/php errors $ /includes/errors.inc diff --git a/sales/includes/db/cust_trans_db.inc b/sales/includes/db/cust_trans_db.inc index dde04fe7..bcd41dba 100644 --- a/sales/includes/db/cust_trans_db.inc +++ b/sales/includes/db/cust_trans_db.inc @@ -99,12 +99,12 @@ function write_customer_trans($trans_type, $trans_no, $debtor_no, $BranchNo, order_, ov_amount, ov_discount, ov_gst, ov_freight, ov_freight_tax, rate, ship_via, alloc, trans_link - ) VALUES ($trans_no, $trans_type, + ) VALUES ($trans_no, $trans_type, ".db_escape($debtor_no).", ".db_escape($BranchNo).", '$SQLDate', '$SQLDueDate', ".db_escape($reference).", - ".db_escape($sales_type).", $order_no, $Total, ".db_escape($discount).", $Tax, + ".db_escape($sales_type).", $order_no, $Total, ".db_escape($discount).", $Tax, ".db_escape($Freight).", - $FreightTax, $rate, ".db_escape($ship_via).", $AllocAmt, ".db_escape($trans_link); + $FreightTax, $rate, ".db_escape($ship_via).", $AllocAmt, ".db_escape($trans_link).")"; } else { // may be optional argument should stay unchanged ? $sql = "UPDATE ".TB_PREF."debtor_trans SET debtor_no=".db_escape($debtor_no)." , branch_code=".db_escape($BranchNo).", -- 2.30.2