- if ($doctype == 8 || $doctype == 9) // PO or SO
- $this->Text($mcol, $myrow['order_no'], $mcol + 90);
- else if (isset($myrow['trans_no']) && isset($myrow['reference'])) // INV/CRE/STA
- {
- if ($print_invoice_no == 1)
- $this->Text($mcol, $myrow['trans_no'], $mcol + 90);
- else
- $this->Text($mcol, $myrow['reference'], $mcol + 90);
- }
- if (isset($myrow['debtor_no']))
- $this->Text($mcol + 90, $myrow['debtor_no'], $mcol + 180);
- if ($doctype == 8 || $doctype == 9)
- $this->Text($mcol + 180, sql2date($myrow['ord_date']));
- else
- $this->Text($mcol + 180, sql2date($myrow['tran_date']));
-
- $this->fontSize -= 4;
- $this->row = $iline1 - 5;
- $this->Text($ccol, $doc_Charge_To, $icol);
- $this->Text($mcol, $doc_Delivered_To);
- $this->fontSize += 4;
+ // Document title
+ $this->SetTextColor(190, 190, 190);
+ $this->fontSize += 10;
+ $this->Font('bold');
+ $this->TextWrap($mcol, $this->row, $this->pageWidth - $this->rightMargin - $mcol - 20, $this->title, 'right');
+ $this->Font();
+ $this->fontSize -= 10;
+ $this->NewLine();
+ $this->SetTextColor(0, 0, 0);
+ $adrline = $this->row;