X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2Fheader2.inc;h=c783c915f44545e397ee514dfd578412727eadd9;hb=3b06c6c4718610a408cae2e9b76c3134ca30b84c;hp=d1ac120b0cb09304c4523221bf64fa201409ceed;hpb=565a41e2d7fd4b4a32848e4829c11dbbcb5881d1;p=fa-stable.git diff --git a/reporting/includes/header2.inc b/reporting/includes/header2.inc index d1ac120b..c783c915 100644 --- a/reporting/includes/header2.inc +++ b/reporting/includes/header2.inc @@ -58,17 +58,20 @@ for ($i = 0; $i < 5; $i++) { $this->LineTo($col += $width, $iline2,$col, $iline4); - } + } $this->LineTo($right, $iline2 ,$right, $iline4); $this->LineTo($this->leftMargin, $iline5 ,$this->leftMargin, $iline7); - $this->LineTo($this->cols[$cols - 2] + 4, $iline5 ,$this->cols[$cols - 2] + 4, $iline7); + if ($this->l['a_meta_dir'] == 'rtl') // avoid line overwrite in rtl language + $this->LineTo($this->cols[$cols - 2], $iline5 ,$this->cols[$cols - 2], $iline7); + else + $this->LineTo($this->cols[$cols - 2] + 4, $iline5 ,$this->cols[$cols - 2] + 4, $iline7); $this->LineTo($right, $iline5 ,$right, $iline7); // Company Logo $this->NewLine(); - if ($this->company['coy_logo'] != '') + $logo = company_path() . "/images/" . $this->company['coy_logo']; + if ($this->company['coy_logo'] != '' && file_exists($logo)) { - $logo = company_path() . "/images/" . $this->company['coy_logo']; $this->AddImage($logo, $ccol, $this->row, 0, 40); } else @@ -93,19 +96,19 @@ // Company data $this->TextWrapLines($ccol, $icol, $this->company['postal_address']); $this->Font('italic'); - if ($this->company['phone'] != "") + if (@$this->company['phone']) { $this->Text($ccol, _("Phone"), $c2col); $this->Text($c2col, $this->company['phone'], $mcol); $this->NewLine(); - } - if ($this->company['fax'] != "") + } + if (@$this->company['fax']) { $this->Text($ccol, _("Fax"), $c2col); $this->Text($c2col, $this->company['fax'], $mcol); $this->NewLine(); - } - if ($this->company['email'] != "") + } + if (@$this->company['email']) { $this->Text($ccol, _("Email"), $c2col); @@ -117,13 +120,13 @@ $this->NewLine(); } - if ($this->company['gst_no'] != "") + if (@$this->company['gst_no']) { $this->Text($ccol, _("Our VAT No."), $c2col); $this->Text($c2col, $this->company['gst_no'], $mcol); $this->NewLine(); } - if ($this->formData['domicile'] != "") + if (@$this->formData['domicile']) { $this->Text($ccol, _("Domicile"), $c2col); $this->Text($c2col, $this->company['domicile'], $mcol); @@ -139,7 +142,7 @@ $this->Text($mcol + 100, $this->formData['document_name']); $this->Text($mcol + 180, $this->formData['document_number']); - if ($this->pageNumber > 1 && !strstr($this->filename, "Bulk")) + if ($this->pageNumber > 1) $this->Text($this->endLine - 35, _("Page") . ' ' . $this->pageNumber); $this->row = $iline1 - $this->lineHeight; $this->fontSize -= 4; @@ -210,4 +213,4 @@ $this->Font(); $temp = $iline6 - $this->lineHeight - 2; -?> \ No newline at end of file +?>