From 5a85f8a3969f4ff2252865daf4541768ef7f6250 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sat, 18 Jun 2011 15:06:48 +0200 Subject: [PATCH] A couple of additional fixes to changed document reports. --- reporting/includes/doctext.inc | 2 +- reporting/includes/excel_report.inc | 2 +- reporting/includes/pdf_report.inc | 5 +++-- reporting/rep107.php | 2 +- reporting/rep108.php | 2 +- reporting/rep109.php | 2 +- reporting/rep110.php | 2 +- reporting/rep111.php | 2 +- reporting/rep113.php | 2 +- reporting/rep209.php | 2 +- reporting/rep210.php | 2 +- reporting/rep409.php | 2 +- 12 files changed, 14 insertions(+), 13 deletions(-) diff --git a/reporting/includes/doctext.inc b/reporting/includes/doctext.inc index e296ead..bd8a29b 100644 --- a/reporting/includes/doctext.inc +++ b/reporting/includes/doctext.inc @@ -151,7 +151,7 @@ $Addr1['address'] = $this->formData['address']; $Addr2['title'] = _("Deliver To"); $Addr2['name'] = $this->company['coy_name']; - $Addr2['address'] = $this->formData['deliver_to']; + $Addr2['address'] = $this->company['postal_address']; $this->formData['document_date'] = $this->formData['ord_date']; $this->formData['document_number'] = $this->formData['order_no']; diff --git a/reporting/includes/excel_report.inc b/reporting/includes/excel_report.inc index cc5cafc..33ac54a 100644 --- a/reporting/includes/excel_report.inc +++ b/reporting/includes/excel_report.inc @@ -693,7 +693,7 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook return ($px / $unit_offset_length); } - function End($email=0, $subject=null, $myrow=null, $doctype = 0) + function End($email=0, $subject='') { global $path_to_root; ++$this->y; diff --git a/reporting/includes/pdf_report.inc b/reporting/includes/pdf_report.inc index 9e40543..0648ad7 100644 --- a/reporting/includes/pdf_report.inc +++ b/reporting/includes/pdf_report.inc @@ -945,7 +945,7 @@ class FrontReport extends Cpdf $this->{$this->headerTmpl}(); } - function End($email=0) + function End($email=0, $subject='') { global $pdf_debug, $path_to_root; @@ -980,7 +980,8 @@ class FrontReport extends Cpdf display_error(_("You have no email contact defined for this type of document")); } else { $sent = $try = 0; - $subject = $this->formData['document_name'] . ' '. $this->formData['document_number']; + if(!$subject) + $subject = $this->formData['document_name'] . ' '. $this->formData['document_number']; foreach($this->contactData as $contact) { if (!isset($contact['email'])) continue; diff --git a/reporting/rep107.php b/reporting/rep107.php index e5a832c..99c58a5 100644 --- a/reporting/rep107.php +++ b/reporting/rep107.php @@ -202,7 +202,7 @@ function print_invoices() $rep->Font(); if ($email == 1) { - $rep->End($email, '', $myrow, ST_SALESINVOICE); + $rep->End($email); } } if ($email == 0) diff --git a/reporting/rep108.php b/reporting/rep108.php index 83234fd..9315f64 100644 --- a/reporting/rep108.php +++ b/reporting/rep108.php @@ -166,7 +166,7 @@ function print_statements() for ($i = 0; $i < 5; $i++) $rep->TextWrap($col[$i], $rep->row, $col[$i + 1] - $col[$i], $str2[$i], 'right'); if ($email == 1) - $rep->End($email, _("Statement") . " " . _("as of") . " " . sql2date($date), $myrow, ST_STATEMENT); + $rep->End($email, _("Statement") . " " . _("as of") . " " . sql2date($date)); } if ($email == 0) diff --git a/reporting/rep109.php b/reporting/rep109.php index 3939459..181a034 100644 --- a/reporting/rep109.php +++ b/reporting/rep109.php @@ -211,7 +211,7 @@ function print_sales_orders() $rep->Font(); if ($email == 1) { - $rep->End($email, '', $myrow); + $rep->End($email); } } if ($email == 0) diff --git a/reporting/rep110.php b/reporting/rep110.php index b4bf2e9..ad19c6b 100644 --- a/reporting/rep110.php +++ b/reporting/rep110.php @@ -215,7 +215,7 @@ function print_deliveries() } if ($email == 1) { - $rep->End($email, '', $myrow, ST_CUSTDELIVERY); + $rep->End($email); } } if ($email == 0) diff --git a/reporting/rep111.php b/reporting/rep111.php index d11e487..80b6b71 100644 --- a/reporting/rep111.php +++ b/reporting/rep111.php @@ -200,7 +200,7 @@ function print_sales_quotations() { if ($print_invoice_no == 1) $myrow['reference'] = $i; - $rep->End($email, '', $myrow); + $rep->End($email); } } if ($email == 0) diff --git a/reporting/rep113.php b/reporting/rep113.php index 4a11074..8fb6fd0 100644 --- a/reporting/rep113.php +++ b/reporting/rep113.php @@ -204,7 +204,7 @@ function print_credits() if ($email == 1) { $myrow['dimension_id'] = $paylink; // helper for pmt link - $rep->End($email, '', $myrow, ST_CUSTCREDIT); + $rep->End($email); } } if ($email == 0) diff --git a/reporting/rep209.php b/reporting/rep209.php index 2463992..c7eed10 100644 --- a/reporting/rep209.php +++ b/reporting/rep209.php @@ -223,7 +223,7 @@ function print_po() if ($myrow['reference'] == "") $myrow['reference'] = $myrow['order_no']; - $rep->End($email, '', $myrow); + $rep->End($email); } } if ($email == 0) diff --git a/reporting/rep210.php b/reporting/rep210.php index 2c94b3d..072e8d9 100644 --- a/reporting/rep210.php +++ b/reporting/rep210.php @@ -173,7 +173,7 @@ function print_remittances() if ($email == 1) { $myrow['DebtorName'] = $myrow['supp_name']; - $rep->End($email, '', $myrow); + $rep->End($email); } } } diff --git a/reporting/rep409.php b/reporting/rep409.php index 60f58b0..2974d64 100644 --- a/reporting/rep409.php +++ b/reporting/rep409.php @@ -144,7 +144,7 @@ function print_workorders() { $myrow['DebtorName'] = $myrow['contact']; $myrow['reference'] = $myrow['wo_ref']; - $rep->End($email, _("Work Order No.") . " " . $myrow['wo_ref'], $myrow); + $rep->End($email); } } if ($email == 0) -- 2.30.2