Merged changes form main trunk (2.2.8, 2.2.9)
[fa-stable.git] / reporting / includes / header2.inc
index 141881017385ddb909fc78ea0faa5570836738a7..362ebaace5cd22274c50c37d80ed0e588259f20e 100644 (file)
                        $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->TextWrapLines($mcol, $this->rightMargin - $mcol, $this->formData['delivery_address']);
+                       elseif ($doctype != ST_SUPPAYMENT && isset($sales_order['deliver_to']))
+                       {
+                               $this->Text($mcol, $sales_order['deliver_to']);
+                               $this->NewLine();
+                       }       
+                       // if you need the company name in purchase order then write it as first line in location addresss.     
+                       if ($doctype != ST_SUPPAYMENT && isset($sales_order['delivery_address']))
+                               $this->TextWrapLines($mcol, $this->rightMargin - $mcol, $sales_order['delivery_address']);
                }
                $this->row = $iline2 - $this->lineHeight - 1;
                $col = $this->leftMargin;