Removed old headerfunc in rep111.php (Sales Quotation)
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 24 Aug 2010 13:39:35 +0000 (13:39 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 24 Aug 2010 13:39:35 +0000 (13:39 +0000)
CHANGELOG.txt
reporting/rep111.php

index 9e948fcedb8b58a4321496fca261671e0ffe1f52..ca9ea2dd6ff103a3fb3f05fe90fe3f12ff57f3d7 100644 (file)
@@ -19,6 +19,10 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+24-Aug-2010 Joe Hunt
+# Removed old headerfunc in rep111.php (Sales Quotation)
+$ /reporting/rep111.php
+
 23-Aug-2010 Janusz Dobrowolski
 + Added german translation for install wizard (thanks to iscongroup) 
 $ /install/isession.inc
index 69fac4282e2c6149a58035773d1ef6675a212e07..00e0dcb79631894899518fc11c591a17af2fc152 100644 (file)
@@ -30,7 +30,7 @@ print_sales_quotations();
 
 function print_sales_quotations()
 {
-       global $path_to_root, $print_as_quote;
+       global $path_to_root, $print_as_quote, $print_invoice_no;
 
        include_once($path_to_root . "/reporting/includes/pdf_report.inc");
 
@@ -76,13 +76,16 @@ function print_sales_quotations()
                        $rep->SetHeaderType('Header2');
                        $rep->currency = $cur;
                        $rep->Font();
-                       $rep->filename = "SalesQuotation" . $i . ".pdf";
+                       if ($print_invoice_no == 1)
+                               $rep->filename = "SalesQuotation" . $i . ".pdf";
+                       else    
+                               $rep->filename = "SalesQuotation" . $myrow['reference'] . ".pdf";
                        $rep->Info($params, $cols, null, $aligns);
                }
                $rep->title = _("SALES QUOTATION");
                $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no']);
                $rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESQUOTE, $contacts);
-               $rep->headerFunc = 'Header2';
+               //$rep->headerFunc = 'Header2';
                $rep->NewPage();
 
                $result = get_sales_order_details($i, ST_SALESQUOTE);
@@ -156,8 +159,9 @@ function print_sales_quotations()
                                        $myrow['contact_email'] = $myrow['master_email'];
                                $myrow['DebtorName'] = $branch['br_name'];
                        }
-                       //$myrow['reference'] = $i;
-                       $rep->End($email, $doc_Invoice_no . " " . $i, $myrow);
+                       if ($print_invoice_no == 1)
+                               $myrow['reference'] = $i;
+                       $rep->End($email, $doc_Invoice_no . " " . $myrow['reference'], $myrow);
                }
        }
        if ($email == 0)