From d8a0ec040d666cdf5e14c15f7d39f9058634c4f2 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Wed, 2 May 2007 15:50:00 +0000 Subject: [PATCH] Missing details on Purchase Order when emailing and printing --- CHANGELOG.txt | 4 ++++ reporting/rep209.php | 15 +++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 89d88b0..29510e0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,10 @@ Legend: ! -> Note $ -> Affected files +02-May-2007 Joe Hunt + # Missing details on Purchase Order when emailing and printing + $ /reporting/rep209.php + -------------------- 1.1 Stable Released ---------------------- 02-May-2007 Joe Hunt + Enabled module addons and all the below bugfixes. No changes in database structure. diff --git a/reporting/rep209.php b/reporting/rep209.php index 947dd64..1f9f569 100644 --- a/reporting/rep209.php +++ b/reporting/rep209.php @@ -23,7 +23,8 @@ print_po(); function get_po($order_no) { $sql = "SELECT ".TB_PREF."purch_orders.*, ".TB_PREF."suppliers.supp_name, - ".TB_PREF."suppliers.curr_code, ".TB_PREF."suppliers.payment_terms, ".TB_PREF."locations.location_name + ".TB_PREF."suppliers.curr_code, ".TB_PREF."suppliers.payment_terms, ".TB_PREF."locations.location_name, + ".TB_PREF."suppliers.email, ".TB_PREF."suppliers.address FROM ".TB_PREF."purch_orders, ".TB_PREF."suppliers, ".TB_PREF."locations WHERE ".TB_PREF."purch_orders.supplier_id = ".TB_PREF."suppliers.supplier_id AND ".TB_PREF."locations.loc_code = into_stock_location @@ -90,7 +91,7 @@ function print_po() $rep = new FrontReport("", "", user_pagesize()); $rep->currency = $cur; $rep->Font(); - $rep->title = _('PURCHASE_ORDER'); + $rep->title = _('PURCHASE ORDER'); $rep->filename = "PurchaseOrder" . $i . ".pdf"; $rep->Info($params, $cols, null, $aligns); } @@ -147,12 +148,10 @@ function print_po() $rep->Font(); if ($email == 1) { - if ($myrow['contact_email'] == '') - { - $myrow['contact_email'] = $branch['email']; - $myrow['DebtorName'] = $branch['br_name']; - } - $rep->End($email, $doc_Invoice_no . " " . $myrow['reference'], $myrow); + $myrow['contact_email'] = $myrow['email']; + $myrow['DebtorName'] = $myrow['supp_name']; + $myrow['reference'] = $myrow['order_no']; + $rep->End($email, $doc_Order_no . " " . $myrow['reference'], $myrow); } } if ($email == 0) -- 2.30.2