X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2Fheader2.inc;h=c3fd180b9baab9f7b6f98efadee875b038390b56;hb=9dab04be9d81766f1878d3688ee73d0bcf29f5d2;hp=f98c3ffacd14235f3bb92727a76bb85554c826e1;hpb=074f5b55ae369597c70953bc7f9324cc491a6a7e;p=fa-stable.git diff --git a/reporting/includes/header2.inc b/reporting/includes/header2.inc index f98c3ffa..c3fd180b 100644 --- a/reporting/includes/header2.inc +++ b/reporting/includes/header2.inc @@ -236,10 +236,16 @@ $col += $width; if ($doctype == 10) { - $deliveries = get_parent_trans(10,$myrow['trans_no']); + $deliveries = get_parent_trans(ST_SALESINVOICE, $myrow['trans_no']); $line = ""; foreach ($deliveries as $delivery) { + if ($print_invoice_no == 0) + { + $ref = get_reference(ST_CUSTDELIVERY, $delivery); + if ($ref) + $delivery = $ref; + } if ($line == "") $line .= "$delivery"; else @@ -247,6 +253,17 @@ } $this->TextWrap($col, $this->row, $width, $line, 'C'); } + elseif ($doctype == 13) + { + $ref = $myrow['order_']; + if ($print_invoice_no == 0) + { + $ref = get_reference(ST_SALESORDER, $myrow['order_']); + if (!$ref) + $ref = $myrow['order_']; + } + $this->TextWrap($col, $this->row, $width, $ref, 'C'); + } elseif ($doctype == 26) $this->TextWrap($col, $this->row, $width, $myrow["location_name"], 'C'); elseif (isset($myrow['order_']))