Report Customer Details didn't show up correctly in Excel
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 2 Nov 2010 09:12:26 +0000 (09:12 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 2 Nov 2010 09:12:26 +0000 (09:12 +0000)
CHANGELOG.txt
reporting/rep103.php

index 3d7e3e428ee8e588c057bf8806847d3dea3a7f8c..833c406a6c6262232fc10165b231fd3d7a495aec 100644 (file)
@@ -19,6 +19,10 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+02-Nov-2010 Joe Hunt
+# Report Customer Details didn't show up correctly in Excel
+$ /reporting/rep103.php
+
 30-Oct-2010 Janusz Dobrowolski
 ! Added group code in account groups list selector.
 $ /includes/ui/ui_lists.inc
index 5ad7f26526375555e90d5ca2faa6442b8eab2974..a028c331bb0be563ef8b60e905eb97e6ffb2d4a9 100644 (file)
@@ -190,6 +190,49 @@ function print_customer_details_listing()
                                $rep->NewLine();
                        }
                        $rep->NewLine();
+                       // Here starts the new report lines 2010-11-02 Joe Hunt
+                       $contacts = get_branch_contacts($myrow['branch_code']);
+                       $rep->TextCol(0, 1,     $myrow['name']);
+                       $rep->TextCol(1, 2,     _('Price List') . ": " . $myrow['sales_type']);
+                       $rep->TextCol(2, 3,     $myrow['br_name']);
+                       $rep->NewLine();
+                       $adr = Explode("\n", $myrow['address']);
+                       $adr2 = Explode("\n", $myrow['br_address']);
+                       $count1 = count($adr);
+                       $count2 = count($adr2);
+                       $count1 = max($count1, $count2);
+                       if (isset($adr[0]))
+                               $rep->TextCol(0, 1, $adr[0]);
+                       if ($more != 0.0 || $less != 0.0)
+                               $rep->TextCol(1, 2,     _('Turnover') . ": " . number_format2($turnover, $dec));
+                       if (isset($contacts[0]))
+                               $rep->TextCol(2, 3, $contacts[0]['name']);
+                       if (isset($adr2[0]))    
+                               $rep->TextCol(3, 4, $adr2[0]);
+                       $rep->NewLine();
+                       if (isset($adr[1]))
+                               $rep->TextCol(0, 1, $adr[1]);
+                       if (isset($contacts[0]))
+                               $rep->TextCol(2, 3, _('Ph') . ": " . $contacts[0]['phone']);
+                       if (isset($adr2[1]))
+                               $rep->TextCol(3, 4, $adr2[1]);
+                       $rep->NewLine();
+                       if (isset($adr[2]))
+                               $rep->TextCol(0, 1, $adr[2]);
+                       if (isset($contacts[0]))
+                               $rep->TextCol(2, 3, _('Fax') . ": " . $contacts[0]['fax']);
+                       if (isset($adr2[2]))
+                               $rep->TextCol(3, 4, $adr2[2]);
+                       for ($i = 3; $i < $count1; $i++)
+                       {
+                               $rep->NewLine();
+                               if (isset($adr[$i]))
+                                       $rep->TextCol(0, 1, $adr[$i]);
+                               if (isset($adr2[$i]))
+                                       $rep->TextCol(0, 1, $adr2[$i]);
+                       }       
+                       $rep->NewLine();
+                       /*
                        $rep->TextCol(0, 1,     $myrow['name']);
                        $adr = Explode("\n", $myrow['address']);
                        $count1 = count($adr);
@@ -216,7 +259,8 @@ function print_customer_details_listing()
                        $count2++;
                        $count1 = Max($count1, $count2);
                        $count1 = Max($count1, 4);
-                       $rep->NewLine($count1);
+                       $rep->NewLine($count3);
+                       */
                        $rep->Line($rep->row + 8);
                        $rep->NewLine(0, 3);
                }