X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2Fheader2.inc;h=9c9b36b7c3e5032524ae2b4da035a45b818b2b79;hb=90918bc962095868c2c94ca52aff4b353cb68608;hp=141881017385ddb909fc78ea0faa5570836738a7;hpb=d23b97ed26bc0608c9ba1037b66058c709e83765;p=fa-stable.git diff --git a/reporting/includes/header2.inc b/reporting/includes/header2.inc index 14188101..9c9b36b7 100644 --- a/reporting/includes/header2.inc +++ b/reporting/includes/header2.inc @@ -186,17 +186,21 @@ $this->NewLine(); $this->TextWrapLines($ccol, $icol - $ccol, $addr); } + $this->row = $temp; if (isset($this->formData['deliver_to'])) { - $this->row = $temp; if ($doctype == ST_PURCHORDER) $this->Text($mcol, $this->company['coy_name']); elseif ($doctype != ST_SUPPAYMENT && isset($this->formData['deliver_to'])) + { $this->Text($mcol, $this->formData['deliver_to']); - $this->NewLine(); - if ($doctype != ST_SUPPAYMENT && isset($this->formData['deliver_to'])) + $this->NewLine(); + } + if ($doctype != ST_SUPPAYMENT && isset($this->formData['delivery_address'])) $this->TextWrapLines($mcol, $this->rightMargin - $mcol, $this->formData['delivery_address']); - } + } // if you need the company name in purchase order then write it as first line in location addresss. + elseif ($doctype == ST_PURCHORDER && isset($this->formData['delivery_address'])) + $this->TextWrapLines($mcol, $this->rightMargin - $mcol, $this->formData['delivery_address']); $this->row = $iline2 - $this->lineHeight - 1; $col = $this->leftMargin; $this->TextWrap($col, $this->row, $width, $doc_Customers_Ref, 'C'); @@ -243,22 +247,14 @@ $col += $width; if ($doctype == ST_SALESINVOICE) { - $deliveries = get_parent_trans(ST_SALESINVOICE, $this->formData['trans_no']); - $line = ""; - foreach ($deliveries as $delivery) + $deliveries = get_sales_parent_numbers(ST_SALESINVOICE, $this->formData['trans_no']); + if ($print_invoice_no == 0) { - if ($print_invoice_no == 0) - { - $ref = get_reference(ST_CUSTDELIVERY, $delivery); - if ($ref) - $delivery = $ref; - } - if ($line == "") - $line .= "$delivery"; - else - $line .= ",$delivery"; - } - $this->TextWrap($col, $this->row, $width, $line, 'C'); + foreach($deliveries as $n => $delivery) { + $deliveries[$n] = get_reference(ST_CUSTDELIVERY, $delivery); + } + } + $this->TextWrap($col, $this->row, $width, implode(',', $deliveries), 'C'); } elseif ($doctype == ST_CUSTDELIVERY) {