From: Joe Hunt Date: Tue, 29 Jan 2013 10:48:17 +0000 (+0100) Subject: Small bugs in Customer Detail Report and Supplier Detail Report. X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=8475db32a3686cefaafb0679ba0148e091e88968;p=textcart.git Small bugs in Customer Detail Report and Supplier Detail Report. --- diff --git a/reporting/rep103.php b/reporting/rep103.php index 84fbd6d..3b8cceb 100644 --- a/reporting/rep103.php +++ b/reporting/rep103.php @@ -39,6 +39,7 @@ function get_customer_details_for_report($area=0, $salesid=0) ".TB_PREF."cust_branch.branch_code, ".TB_PREF."cust_branch.br_name, ".TB_PREF."cust_branch.br_address, + ".TB_PREF."cust_branch.br_post_address, ".TB_PREF."cust_branch.contact_name, ".TB_PREF."cust_branch.area, ".TB_PREF."cust_branch.salesman, @@ -215,10 +216,14 @@ function print_customer_details_listing() $rep->TextCol(2, 3, $myrow['br_name']); $rep->NewLine(); $adr = Explode("\n", $myrow['address']); - $adr2 = Explode("\n", $myrow['br_address']); + if ($myrow['br_post_address'] == '') + $adr2 = Explode("\n", $myrow['br_address']); + else + $adr2 = Explode("\n", $myrow['br_post_address']); $count1 = count($adr); $count2 = count($adr2); $count1 = max($count1, $count2); + $count1 = max($count1, 4); if (isset($adr[0])) $rep->TextCol(0, 1, $adr[0]); $rep->TextCol(1, 2, _('Currency') . ": " . $myrow['curr_code']); @@ -257,14 +262,11 @@ function print_customer_details_listing() $rep->NewLine(); if (isset($adr[$i])) $rep->TextCol(0, 1, $adr[$i]); + if ($i == 3 && isset($contacts[0]) && isset($contacts[0]['email'])) + $rep->TextCol(2, 3, _('Email') . ": " . $contacts[0]['email']); if (isset($adr2[$i])) - $rep->TextCol(0, 1, $adr2[$i]); + $rep->TextCol(3, 4, $adr2[$i]); } - if (isset($contacts[0]) && isset($contacts[0]['email'])) - { - $rep->NewLine(); - $rep->TextCol(2, 4, _('Email') . ": " . $contacts[0]['email']); - } $rep->NewLine(); /* $rep->TextCol(0, 1, $myrow['name']); diff --git a/reporting/rep205.php b/reporting/rep205.php index 25393a3..e7e6255 100644 --- a/reporting/rep205.php +++ b/reporting/rep205.php @@ -141,6 +141,7 @@ function print_supplier_details_listing() $count1 = count($adr); $count2 = count($adr2); $count1 = max($count1, $count2); + $count1 = max($count1, 4); if (isset($adr[0])) $rep->TextCol(0, 1, $adr[0]); $rep->TextCol(1, 2, _('Currency') . ": " . $myrow['curr_code']); @@ -179,14 +180,11 @@ function print_supplier_details_listing() $rep->NewLine(); if (isset($adr[$i])) $rep->TextCol(0, 1, $adr[$i]); + if ($i == 3 && isset($contacts[0]) && isset($contacts[0]['email'])) + $rep->TextCol(2, 3, _('Email') . ": " . $contacts[0]['email']); if (isset($adr2[$i])) - $rep->TextCol(0, 1, $adr2[$i]); + $rep->TextCol(3, 4, $adr2[$i]); } - if (isset($contacts[0]) && isset($contacts[0]['email'])) - { - $rep->NewLine(); - $rep->TextCol(2, 4, _('Email') . ": " . $contacts[0]['email']); - } $rep->NewLine(); $rep->Line($rep->row + 8); $rep->NewLine(0, 3);