- $temp = $this->row;
- if ($doctype == 9)
- {
- $this->Text($ccol, $myrow['name'], $icol);
- }
- else
- {
- if ($doctype == 8) {
- $name = $myrow['supp_name'];
- $addr = $myrow['address'];
- } else {
- if (trim($branch['br_address']) != '') {
- $name = $branch['br_name'];
- $addr = $branch['br_address'];
- } else {
- $name = $myrow['DebtorName'];
- $addr = $myrow['address'];
- }
- }
- $this->Text($ccol, $name, $icol);
- $this->NewLine();
- $this->TextWrapLines($ccol, $icol - $ccol, $addr);
- }
- if ($sales_order != NULL)
- {
- $this->row = $temp;
- if ($doctype == 8)
- $this->Text($mcol, $this->company['coy_name']);
- else
- $this->Text($mcol, $sales_order['deliver_to']);
- $this->NewLine();
- $this->TextWrapLines($mcol, $this->rightMargin - $mcol, $sales_order['delivery_address']);
- }
- $this->row = $iline2 - $this->lineHeight - 1;
- $col = $this->leftMargin;
- $this->TextWrap($col, $this->row, $width, $doc_Customers_Ref, 'C');
- $col += $width;
- $this->TextWrap($col, $this->row, $width, $doc_Our_Ref, 'C');
- $col += $width;
- $this->TextWrap($col, $this->row, $width, $doc_Your_VAT_no, 'C');
- $col += $width;
- if ($doctype == 10)
- $this->TextWrap($col, $this->row, $width, $doc_Delivery_no, 'C');
- else
- $this->TextWrap($col, $this->row, $width, $doc_Our_Order_No, 'C');
- $col += $width;
- $this->TextWrap($col, $this->row, $width, $doc_Payment_Terms, 'C');
- $col += $width;
- $this->TextWrap($col, $this->row, $width, $doc_Due_Date, 'C');
- $this->row = $iline3 - $this->lineHeight - 1;