A couple of additional fixes to changed document reports.
authorJanusz Dobrowolski <janusz@frontaccouting.eu>
Sat, 18 Jun 2011 13:06:48 +0000 (15:06 +0200)
committerJanusz Dobrowolski <janusz@frontaccouting.eu>
Sat, 18 Jun 2011 13:06:48 +0000 (15:06 +0200)
12 files changed:
reporting/includes/doctext.inc
reporting/includes/excel_report.inc
reporting/includes/pdf_report.inc
reporting/rep107.php
reporting/rep108.php
reporting/rep109.php
reporting/rep110.php
reporting/rep111.php
reporting/rep113.php
reporting/rep209.php
reporting/rep210.php
reporting/rep409.php

index e296ead38beb4b96d1181feae59c7b90afe1d645..bd8a29bcae4f76857994eedb365a67d5c4513adb 100644 (file)
                        $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'];
 
index cc5cafcc814cb16fb05d14ac8c9a6e64bf6a25fc..33ac54a529448ee627444c4679e9dd357a41b567 100644 (file)
@@ -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;
index 9e405431746e1fe1c2860bd1fd2a7ff7d75c39b1..0648ad7d6015cfdd31d542ec586d5d552e02490e 100644 (file)
@@ -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;
index e5a832cc44899ab46c3c2ac084ee636178aff766..99c58a5171d7a0eb3277af3b28b5d01c8f968e1a 100644 (file)
@@ -202,7 +202,7 @@ function print_invoices()
                        $rep->Font();
                        if ($email == 1)
                        {
-                               $rep->End($email, '', $myrow, ST_SALESINVOICE);
+                               $rep->End($email);
                        }
        }
        if ($email == 0)
index 83234fd2af1dfa3851af5b1f5a3ac51be98252ed..9315f64974eba83aca3751cdd2561cc8c3c56acf 100644 (file)
@@ -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)
index 3939459d9665b3374c4992617bbd13ae9560f898..181a0344ecbf582bb5a55d531e989fe1fa7e74f5 100644 (file)
@@ -211,7 +211,7 @@ function print_sales_orders()
                $rep->Font();
                if ($email == 1)
                {
-                       $rep->End($email, '', $myrow);
+                       $rep->End($email);
                }
        }
        if ($email == 0)
index b4bf2e9dc9fce0acf7a172fcd991d978153dd3e6..ad19c6b1d5e0223bf751f15ba7206dae4a4d6dd7 100644 (file)
@@ -215,7 +215,7 @@ function print_deliveries()
                        }       
                        if ($email == 1)
                        {
-                               $rep->End($email, '', $myrow, ST_CUSTDELIVERY);
+                               $rep->End($email);
                        }
        }
        if ($email == 0)
index d11e487a74b74381ebfc3817f0502d794f74154a..80b6b712515792cf04e80283bcbfa6f33bc79553 100644 (file)
@@ -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)
index 4a110745cd02180823c77ce2fc423c1c526d1d69..8fb6fd02ec63875f5f20aaaff6a3435fcc17edb7 100644 (file)
@@ -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)
index 24639927d5293a2c1fc9b307d1a07cec729a72f0..c7eed103c8092c3a15968f0185a3f04b70f8b778 100644 (file)
@@ -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)
index 2c94b3d333580c81671e900ea2207e775cb24a04..072e8d90721620324d92d69496005342fc4a301c 100644 (file)
@@ -173,7 +173,7 @@ function print_remittances()
                        if ($email == 1)
                        {
                                $myrow['DebtorName'] = $myrow['supp_name'];
-                               $rep->End($email, '', $myrow);
+                               $rep->End($email);
                        }
                }       
        }
index 60f58b049be4341e66ab62dfea0c80068254afe7..2974d647fae7f98d4b654937ad10bf8b76ecb5d3 100644 (file)
@@ -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)