- for ($i = 0; $i < $count1; $i++)
- $rep->TextCol(0, 1, $adr[$i], 0, ($i + 1) * $rep->lineHeight);
- $count1++;
- $rep->TextCol(1, 2, _('Price List') . ": " . $myrow['sales_type']);
+ $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']);
+ if (isset($contacts[0]))
+ $rep->TextCol(2, 3, $contacts[0]['name']. " " .$contacts[0]['name2']);
+ if (isset($adr2[0]))
+ $rep->TextCol(3, 4, $adr2[0]);
+ $rep->NewLine();
+ if (isset($adr[1]))
+ $rep->TextCol(0, 1, $adr[1]);
+ if ($myrow['dimension_id'] != 0)
+ {
+ $dim = get_dimension($myrow['dimension_id']);
+ $rep->TextCol(1, 2, _('Dimension') . ": " . $dim['name']);
+ }
+ 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 ($myrow['dimension2_id'] != 0)
+ {
+ $dim = get_dimension($myrow['dimension2_id']);
+ $rep->TextCol(1, 2, _('Dimension') . " 2: " . $dim['name']);
+ }
+ if ($myrow['notes'] != '')
+ {
+ $oldrow = $rep->row;
+ $rep->NewLine();
+ $rep->TextColLines(1, 2, _("General Notes:")." ".$myrow['notes'], -2);
+ $newrow = $rep->row;
+ $rep->row = $oldrow;
+ }
+ if (isset($contacts[0]))
+ $rep->TextCol(2, 3, _('Fax') . ": " . $contacts[0]['fax']);
+ if (isset($adr2[2]))
+ $rep->TextCol(3, 4, $adr2[2]);