projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
*** empty log message ***
[fa-stable.git]
/
reporting
/
includes
/
header2.inc
diff --git
a/reporting/includes/header2.inc
b/reporting/includes/header2.inc
index 5fdf36f2910d33a076fd6d25e52aaa1386d34c6a..341788040cbf1e052ea78f6d12e89f7573452328 100644
(file)
--- a/
reporting/includes/header2.inc
+++ b/
reporting/includes/header2.inc
@@
-47,7
+47,7
@@
if ($this->company['coy_logo'] != '')
{
$logo = $comp_path .'/'. user_company() . "/images/" . $this->company['coy_logo'];
if ($this->company['coy_logo'] != '')
{
$logo = $comp_path .'/'. user_company() . "/images/" . $this->company['coy_logo'];
- $this->AddImage($logo, $ccol, $iline1 + 5,
25
0, 40);
+ $this->AddImage($logo, $ccol, $iline1 + 5, 0, 40);
}
else
{
}
else
{
@@
-57,10
+57,8
@@
$this->Font();
$this->fontSize -= 4;
}
$this->Font();
$this->fontSize -= 4;
}
- if ($doctype == 8
) // P
O
+ if ($doctype == 8
|| $doctype == 9) // PO or S
O
$this->Text($mcol, $myrow['order_no'], $mcol + 90);
$this->Text($mcol, $myrow['order_no'], $mcol + 90);
- else if ($doctype == 9) // SO
- $this->Text($mcol, $myrow['order_no'] ." ".$myrow['customer_ref'], $mcol + 90);
else if (isset($myrow['trans_no']) && isset($myrow['reference'])) // INV/CRE/STA
{
if ($print_invoice_no == 1)
else if (isset($myrow['trans_no']) && isset($myrow['reference'])) // INV/CRE/STA
{
if ($print_invoice_no == 1)
@@
-86,7
+84,6
@@
if ($doctype == 9)
{
$this->Text($ccol, $myrow['name'], $icol);
if ($doctype == 9)
{
$this->Text($ccol, $myrow['name'], $icol);
- $adr = array();
}
else
{
}
else
{
@@
-94,12
+91,8
@@
$this->Text($ccol, $myrow['supp_name'], $icol);
else
$this->Text($ccol, $myrow['DebtorName'], $icol);
$this->Text($ccol, $myrow['supp_name'], $icol);
else
$this->Text($ccol, $myrow['DebtorName'], $icol);
- $adr = explode("\n", $myrow['address']);
- }
- for ($i = 0; $i < count($adr); $i++)
- {
$this->NewLine();
$this->NewLine();
- $this->Text
($ccol, $adr[$i], $icol
);
+ $this->Text
WrapLines($ccol, $icol - $ccol, $myrow['address']
);
}
if ($sales_order != NULL)
{
}
if ($sales_order != NULL)
{
@@
-108,12
+101,8
@@
$this->Text($mcol, $this->company['coy_name']);
else
$this->Text($mcol, $sales_order['deliver_to']);
$this->Text($mcol, $this->company['coy_name']);
else
$this->Text($mcol, $sales_order['deliver_to']);
- $adr = explode("\n", $sales_order['delivery_address']);
- for ($i = 0; $i < count($adr); $i++)
- {
- $this->NewLine();
- $this->Text($mcol, $adr[$i]);
- }
+ $this->NewLine();
+ $this->TextWrapLines($mcol, $this->rightMargin - $mcol, $sales_order['delivery_address']);
}
$this->row = $iline2 - 2 * $this->lineHeight;
$this->Text($ccol, $doc_Shipping_Company . ":", $ccol2);
}
$this->row = $iline2 - 2 * $this->lineHeight;
$this->Text($ccol, $doc_Shipping_Company . ":", $ccol2);
@@
-156,7
+145,11
@@
$this->Text($mcol, $doc_Our_Order_No . ":", $mcol2);
if (isset($myrow['order_']))
$this->Text($mcol2, $myrow['order_']);
$this->Text($mcol, $doc_Our_Order_No . ":", $mcol2);
if (isset($myrow['order_']))
$this->Text($mcol2, $myrow['order_']);
-
+ // 2008-06-16. Added customer's reference
+ $this->NewLine();
+ $this->Text($ccol, $doc_Customers_Ref, $ccol2);
+ if (isset($sales_order["customer_ref"]))
+ $this->Text($ccol2, $sales_order["customer_ref"], $mcol);
$locale = $path_to_root . "lang/" . $_SESSION['language']->code . "/locale.inc";
if (file_exists($locale))
{
$locale = $path_to_root . "lang/" . $_SESSION['language']->code . "/locale.inc";
if (file_exists($locale))
{
@@
-210,13
+203,7
@@
$this->fontSize += 4;
$this->NewLine();
$adrline = $this->row;
$this->fontSize += 4;
$this->NewLine();
$adrline = $this->row;
-
- $adr = explode("\n", $this->company['postal_address']);
- for ($i = 0; $i < count($adr); $i++)
- {
- $this->Text($ccol, $adr[$i], $ccol2 + 40);
- $this->NewLine();
- }
+ $this->TextWrapLines($ccol, $ccol2 + 40 - $ccol, $this->company['postal_address']);
$this->row = $adrline;
$this->Text($ccol2 + 30, $this->company['phone'], $mcol);
$this->NewLine();
$this->row = $adrline;
$this->Text($ccol2 + 30, $this->company['phone'], $mcol);
$this->NewLine();
@@
-227,16
+214,9
@@
$this->row = $adrline;
if (isset($bankaccount['bank_name']))
$this->Text($mcol, $bankaccount['bank_name'], $mcol2);
$this->row = $adrline;
if (isset($bankaccount['bank_name']))
$this->Text($mcol, $bankaccount['bank_name'], $mcol2);
+ $this->NewLine();
if (isset($bankaccount['bank_address']))
if (isset($bankaccount['bank_address']))
- $adr = explode("\n", $bankaccount['bank_address']);
- else
- $adr = array();
- for ($i = 0; $i < count($adr); $i++)
- {
- $this->NewLine();
- $this->Text($mcol, $adr[$i], $mcol2);
- }
-
+ $this->TextWrapLines($mcol, $mcol2 - $mcol, $bankaccount['bank_address']);
$this->row = $adrline;
if (isset($bankaccount['bank_account_name']))
$this->Text($mcol2, $bankaccount['bank_account_name']);
$this->row = $adrline;
if (isset($bankaccount['bank_account_name']))
$this->Text($mcol2, $bankaccount['bank_account_name']);