$doc_Your_VAT_no = _("Your VAT no.");
$doc_Our_VAT_no = _("Our VAT No.");
$doc_Payment_Terms = _("Payment Terms");
- $doc_Customers_Ref = _("Customers Reference:");
+ $doc_Customers_Ref = _("Customers Reference");
$doc_Our_Order_No = _("Our Order No");
$doc_Domicile = _("Domicile");
if($doctype == 13 || $doctype == 8 || $doctype == 9) {
$doc_Your_VAT_no = "Your VAT No.";
$doc_Our_VAT_no = "Our VAT No.";
$doc_Payment_Terms = "Payment Terms";
- $doc_Customers_Ref = "Customers Reference:";
+ $doc_Customers_Ref = "Customers Reference";
$doc_Our_Order_No = "Our Order No";
$doc_Domicile = "Domicile";
if($doctype == 13 || $doctype == 8 || $doctype == 9) {
}
else
{
- if ($doctype == 8)
- $this->Text($ccol, $myrow['supp_name'], $icol);
- else
- $this->Text($ccol, $myrow['DebtorName'], $icol);
+ 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, $myrow['address']);
+ $this->TextWrapLines($ccol, $icol - $ccol, $addr);
}
if ($sales_order != NULL)
{
$this->TextWrap($col, $this->row, $width, $doc_Due_Date, 'C');
$this->row = $iline3 - $this->lineHeight - 1;
$col = $this->leftMargin;
- if ($sales_order != NULL)
+ if (isset($sales_order["customer_ref"]))
$this->TextWrap($col, $this->row, $width, $sales_order["customer_ref"], 'C');
$col += $width;
if ($branch != null)