From 0ad69edb5561aac03a5af49286c37b3350307719 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Fri, 8 Aug 2008 08:38:26 +0000 Subject: [PATCH] Wrong email-adress field taken when emailing documents [0000035]. --- CHANGELOG.txt | 4 ++++ sales/includes/db/cust_trans_db.inc | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 73e24bbe..f9925b55 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,10 @@ Legend: ! -> Note $ -> Affected files +08-Aug-2008 Joe Hunt +# Wrong email-adress field taken when emailing documents [0000035]. +$ /sales/includes/db/cust_trans_db.inc + 02-Aug-2008 Joe Hunt # Use Item Sales Account as default when creating new branch. Customer Branch Sales Account overrides Item Sales Accounts. $ /sales/manage/customer_branches.php diff --git a/sales/includes/db/cust_trans_db.inc b/sales/includes/db/cust_trans_db.inc index bcd41dba..d347dbbf 100644 --- a/sales/includes/db/cust_trans_db.inc +++ b/sales/includes/db/cust_trans_db.inc @@ -126,7 +126,7 @@ function get_customer_trans($trans_id, $trans_type) { $sql = "SELECT ".TB_PREF."debtor_trans.*, ov_amount+ov_gst+ov_freight+ov_freight_tax+ov_discount AS Total, - ".TB_PREF."debtors_master.name AS DebtorName, ".TB_PREF."debtors_master.address, ".TB_PREF."debtors_master.email, + ".TB_PREF."debtors_master.name AS DebtorName, ".TB_PREF."debtors_master.address, ".TB_PREF."debtors_master.email AS email2, ".TB_PREF."debtors_master.curr_code, ".TB_PREF."debtors_master.tax_id, ".TB_PREF."debtors_master.payment_terms "; if ($trans_type == systypes::cust_payment()) { @@ -192,7 +192,10 @@ function get_customer_trans($trans_id, $trans_type) exit; } - return db_fetch($result); + //return db_fetch($result); + $row = db_fetch($result); + $row['email'] = $row['email2']; + return $row; } //---------------------------------------------------------------------------------------- -- 2.30.2