From: Joe Hunt Date: Tue, 4 Aug 2009 08:18:17 +0000 (+0000) Subject: [0000145] Email sales order doesn't work if no email on branch but on customer X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=3f0efaa659eaf99719b9c1fa50a3f6638b6d4599;p=textcart.git [0000145] Email sales order doesn't work if no email on branch but on customer --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index fab8cb1..ea2b6a0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -22,6 +22,9 @@ $ -> Affected files 04-Aug-2009 Joe Hunt # [0000150] Logo on printed papers is placed on top of the adress rule nr 1 $ /reporting/includes/header2.inc +# [0000145] Email sales order doesn't work if no email on branch but on customer +$ /sales/includes/db/sales_order_db.inc + /reporting/rep109.php ------------------------------- Release 2.1.4 ---------------------------------- 30-Jul-2009 Joe Hunt diff --git a/reporting/rep109.php b/reporting/rep109.php index 00b06d2..31a769d 100644 --- a/reporting/rep109.php +++ b/reporting/rep109.php @@ -161,6 +161,8 @@ function print_sales_orders() if ($myrow['contact_email'] == '') { $myrow['contact_email'] = $branch['email']; + if ($myrow['contact_email'] == '') + $myrow['contact_email'] = $myrow['master_email']; $myrow['DebtorName'] = $branch['br_name']; } $myrow['reference'] = $i; diff --git a/sales/includes/db/sales_order_db.inc b/sales/includes/db/sales_order_db.inc index f48cbcf..28aebb3 100644 --- a/sales/includes/db/sales_order_db.inc +++ b/sales/includes/db/sales_order_db.inc @@ -256,6 +256,7 @@ function get_sales_order_header($order_no) $sql = "SELECT ".TB_PREF."sales_orders.*, " .TB_PREF."debtors_master.name, " .TB_PREF."debtors_master.curr_code, " + .TB_PREF."debtors_master.email AS master_email, " .TB_PREF."locations.location_name, " .TB_PREF."debtors_master.payment_terms, " .TB_PREF."debtors_master.discount, "