From 91a637fe74ce0d78b9b4ce099b42449da87c6e71 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 e296ead3..bd8a29bc 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 cc5cafcc..33ac54a5 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 9e405431..0648ad7d 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 e5a832cc..99c58a51 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 83234fd2..9315f649 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 3939459d..181a0344 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 b4bf2e9d..ad19c6b1 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 d11e487a..80b6b712 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 4a110745..8fb6fd02 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 24639927..c7eed103 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 2c94b3d3..072e8d90 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 60f58b04..2974d647 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