Report fixed according to changed headers API in FrontReport class.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 1 Mar 2010 09:54:59 +0000 (09:54 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 1 Mar 2010 09:54:59 +0000 (09:54 +0000)
36 files changed:
reporting/rep101.php
reporting/rep102.php
reporting/rep103.php
reporting/rep104.php
reporting/rep105.php
reporting/rep106.php
reporting/rep107.php
reporting/rep108.php
reporting/rep109.php
reporting/rep110.php
reporting/rep111.php
reporting/rep112.php
reporting/rep201.php
reporting/rep202.php
reporting/rep203.php
reporting/rep204.php
reporting/rep209.php
reporting/rep210.php
reporting/rep301.php
reporting/rep302.php
reporting/rep303.php
reporting/rep304.php
reporting/rep305.php
reporting/rep401.php
reporting/rep409.php
reporting/rep501.php
reporting/rep601.php
reporting/rep701.php
reporting/rep702.php
reporting/rep704.php
reporting/rep705.php
reporting/rep706.php
reporting/rep707.php
reporting/rep708.php
reporting/rep709.php
reporting/rep710.php

index 772d33f0cc6aec6a0199746f284dec5ed74a3c25..6ae113875c7065ffc3d940eec9ddc0d4c6ac7906 100644 (file)
@@ -131,11 +131,9 @@ function print_customer_balances()
                                    3 => array('text' => _('Currency'), 'from' => $currency, 'to' => ''));
 
     $rep = new FrontReport(_('Customer Balances'), "CustomerBalances", user_pagesize());
-
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
-    $rep->Header();
-
+    $rep->NewPage();
        $grandtotal = array(0,0,0,0);
 
        $sql = "SELECT debtor_no, name, curr_code FROM ".TB_PREF."debtors_master ";
index 70ed56713286da2a3a5b49e3a76eda9808ab7284..a2f938c0a8413e80b91b3c99f648f084ed9896f4 100644 (file)
@@ -125,7 +125,7 @@ function print_aged_customer_analysis()
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
-    $rep->Header();
+    $rep->NewPage();
 
        $total = array(0,0,0,0, 0);
 
@@ -235,7 +235,7 @@ function print_aged_customer_analysis()
                $x = ($rep->pageWidth - $w) / 2;
                $rep->NewLine(2);
                if ($rep->row - $h < $rep->bottomMargin)
-                       $rep->Header();
+                       $rep->NewPage();
                $rep->AddImage($filename, $x, $rep->row - $h, $w, $h);
        }
        $rep->NewLine();
index 8ee0abbe62971dcf34bee9d819566a171822829e..db9b8815d60310dfa753ce5e2884cf7048344710 100644 (file)
@@ -151,7 +151,7 @@ function print_customer_details_listing()
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
-    $rep->Header();
+    $rep->NewPage();
 
        $result = get_customer_details_for_report($area, $folk);
        
index d6249e0d5a5dfeaf109b421c98655f56bcb3f81e..2c34f63a096d4ece97ea05de1ef5f5200b2d7e64 100644 (file)
@@ -125,7 +125,7 @@ function print_price_listing()
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
-    $rep->Header();
+    $rep->NewPage();
 
        $result = fetch_items($category);
 
@@ -165,7 +165,7 @@ function print_price_listing()
                        {
                                $rep->NewLine();
                                if ($rep->row - $pic_height < $rep->bottomMargin)
-                                       $rep->Header();
+                                       $rep->NewPage();
                                $rep->AddImage($image, $rep->cols[1], $rep->row - $pic_height, 0, $pic_height);
                                $rep->row -= $pic_height;
                                $rep->NewLine();
index 4b6a086cc55b00166070f36d650eeac56d3425d0..e0dd503637cd407d4acce43c597582fb9074fe80 100644 (file)
@@ -125,7 +125,7 @@ function print_order_status_list()
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns, $cols2, $headers2, $aligns2);
 
-       $rep->Header();
+       $rep->NewPage();
        $orderno = 0;
 
        $result = GetSalesOrders($from, $to, $category, $location, $backorder);
@@ -135,7 +135,7 @@ function print_order_status_list()
                if ($rep->row < $rep->bottomMargin + (2 * $rep->lineHeight))
                {
                        $orderno = 0;
-                       $rep->Header();
+                       $rep->NewPage();
                }
                $rep->NewLine(0, 2, false, $orderno);
                if ($orderno != $myrow['order_no'])
@@ -171,7 +171,7 @@ function print_order_status_list()
                if ($rep->row < $rep->bottomMargin + (2 * $rep->lineHeight))
                {
                        $orderno = 0;
-                       $rep->Header();
+                       $rep->NewPage();
                }
        }
        $rep->Line($rep->row);
index 4aac08ab275ad665a614d3e960c9e44c51daae63..42a02083828a5930dcb30c8872d7beb66ea119dd 100644 (file)
@@ -97,7 +97,7 @@ function print_salesman_list()
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns, $cols2, $headers2, $aligns2);
 
-       $rep->Header();
+       $rep->NewPage();
        $salesman = 0;
        $subtotal = $total = $subprov = $provtotal = 0;
 
@@ -108,7 +108,7 @@ function print_salesman_list()
                if ($rep->row < $rep->bottomMargin + (2 * $rep->lineHeight))
                {
                        $salesman = 0;
-                       $rep->Header();
+                       $rep->NewPage();
                }
                $rep->NewLine(0, 2, false, $salesman);
                if ($salesman != $myrow['salesman_code'])
@@ -155,7 +155,7 @@ function print_salesman_list()
                        if ($rep->row < $rep->bottomMargin + (2 * $rep->lineHeight))
                        {
                                $salesman = 0;
-                               $rep->Header();
+                               $rep->NewPage();
                        }
                }
                $subtotal += $amt;
index e3bd2065207de7463d6ea976ae327143362d651c..91c7a8d34bc887b0807cecf1d6bd236848f16009 100644 (file)
@@ -64,6 +64,7 @@ function print_invoices()
        if ($email == 0)
        {
                $rep = new FrontReport(_('INVOICE'), "InvoiceBulk", user_pagesize());
+               $rep->SetHeaderType('Header2');
                $rep->currency = $cur;
                $rep->Font();
                $rep->Info($params, $cols, null, $aligns);
@@ -91,6 +92,7 @@ function print_invoices()
                        if ($email == 1)
                        {
                                $rep = new FrontReport("", "", user_pagesize());
+                           $rep->SetHeaderType('Header2');
                                $rep->currency = $cur;
                                $rep->Font();
                                if ($j == ST_SALESINVOICE)
@@ -107,7 +109,8 @@ function print_invoices()
                        }
                        else
                                $rep->title = ($j == ST_SALESINVOICE) ? _('INVOICE') : _('CREDIT NOTE');
-                       $rep->Header2($myrow, $branch, $sales_order, $baccount, $j);
+                       $rep->SetCommonData($myrow, $branch, $sales_order, $baccount, $j);
+                       $rep->NewPage();
 
                        $result = get_customer_trans_details($j, $i);
                        $SubTotal = 0;
@@ -139,7 +142,7 @@ function print_invoices()
                                $rep->row = $newrow;
                                //$rep->NewLine(1);
                                if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight))
-                                       $rep->Header2($myrow, $branch, $sales_order, $baccount,$j);
+                                       $rep->NewPage();
                        }
 
                        $comments = get_comments($j, $i);
index 81e3bb7f02a500325822bc8d296c8229ab49e3b7..56a09b4d5dce4a256813d0e28ba032de8c6a5fdb 100644 (file)
@@ -75,6 +75,7 @@ function print_statements()
        if ($email == 0)
        {
                $rep = new FrontReport(_('STATEMENT'), "StatementBulk", user_pagesize());
+               $rep->SetHeaderType('Header2');
                $rep->currency = $cur;
                $rep->Font();
                $rep->Info($params, $cols, null, $aligns);
@@ -101,13 +102,15 @@ function print_statements()
                if ($email == 1)
                {
                        $rep = new FrontReport("", "", user_pagesize());
+                       $rep->SetHeaderType('Header2');
                        $rep->currency = $cur;
                        $rep->Font();
                        $rep->title = _('STATEMENT');
                        $rep->filename = "Statement" . $myrow['debtor_no'] . ".pdf";
                        $rep->Info($params, $cols, null, $aligns);
                }
-               $rep->Header2($myrow, null, null, $baccount, ST_STATEMENT);
+               $rep->SetCommonData($myrow, null, null, $baccount, ST_STATEMENT);
+               $rep->NewPage();
                $rep->NewLine();
                $linetype = true;
                $doctype = ST_STATEMENT;
@@ -142,7 +145,7 @@ function print_statements()
                        $rep->TextCol(7, 8,     $DisplayNet, -2);
                        $rep->NewLine();
                        if ($rep->row < $rep->bottomMargin + (10 * $rep->lineHeight))
-                               $rep->Header2($myrow, null, null, $baccount, ST_STATEMENT);
+                               $rep->NewPage();
                }
                $nowdue = "1-" . $PastDueDays1 . " " . $doc_Days;
                $pastdue1 = $PastDueDays1 + 1 . "-" . $PastDueDays2 . " " . $doc_Days;
index 2c3bb116e54e4c3ad0c8fc9c1d0b694e17dc1608..96b972ed3d2d4e4430853af070193d5c758ddcfb 100644 (file)
@@ -64,6 +64,7 @@ function print_sales_orders()
                        $rep = new FrontReport(_("SALES ORDER"), "SalesOrderBulk", user_pagesize());
                else
                        $rep = new FrontReport(_("QUOTE"), "QuoteBulk", user_pagesize());
+               $rep->SetHeaderType('Header2');
                $rep->currency = $cur;
                $rep->Font();
                $rep->Info($params, $cols, null, $aligns);
@@ -78,6 +79,7 @@ function print_sales_orders()
                if ($email == 1)
                {
                        $rep = new FrontReport("", "", user_pagesize());
+                       $rep->SetHeaderType('Header2');
                        $rep->currency = $cur;
                        $rep->Font();
                        if ($print_as_quote == 1)
@@ -94,7 +96,8 @@ function print_sales_orders()
                }
                else
                        $rep->title = ($print_as_quote==1 ? _("QUOTE") : _("SALES ORDER"));
-               $rep->Header2($myrow, $branch, $myrow, $baccount, ST_SALESORDER);
+               $rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESORDER);
+               $rep->NewPage();
 
                $result = get_sales_order_details($i, ST_SALESORDER);
                $SubTotal = 0;
@@ -123,7 +126,7 @@ function print_sales_orders()
                        $rep->row = $newrow;
                        //$rep->NewLine(1);
                        if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight))
-                               $rep->Header2($myrow, $branch, $myrow, $baccount, ST_SALESORDER);
+                               $rep->NewPage();
                }
                if ($myrow['comments'] != "")
                {
index 3116978072c9c6c8fdb80dd29ba6ee6291423d01..05bb3048e57c6e8b1a5cf34f00ff54574b6ff0f2 100644 (file)
@@ -68,6 +68,7 @@ function print_deliveries()
                        $rep = new FrontReport(_('DELIVERY'), "DeliveryNoteBulk", user_pagesize());
                else
                        $rep = new FrontReport(_('PACKING SLIP'), "PackingSlipBulk", user_pagesize());
+               $rep->SetHeaderType('Header2');
                $rep->currency = $cur;
                $rep->Font();
                $rep->Info($params, $cols, null, $aligns);
@@ -83,6 +84,7 @@ function print_deliveries()
                        if ($email == 1)
                        {
                                $rep = new FrontReport("", "", user_pagesize());
+                               $rep->SetHeaderType('Header2');
                                $rep->currency = $cur;
                                $rep->Font();
                                if ($packing_slip == 0)
@@ -99,7 +101,8 @@ function print_deliveries()
                        }
                        else
                                $rep->title = _('DELIVERY NOTE');
-                       $rep->Header2($myrow, $branch, $sales_order, '', ST_CUSTDELIVERY);
+                       $rep->SetCommonData($myrow, $branch, $sales_order, '', ST_CUSTDELIVERY);
+                       $rep->NewPage();
 
                        $result = get_customer_trans_details(ST_CUSTDELIVERY, $i);
                        $SubTotal = 0;
@@ -134,7 +137,7 @@ function print_deliveries()
                                $rep->row = $newrow;
                                //$rep->NewLine(1);
                                if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight))
-                                       $rep->Header2($myrow, $branch, $sales_order,'',ST_CUSTDELIVERY);
+                                       $rep->NewPage();
                        }
 
                        $comments = get_comments(ST_CUSTDELIVERY, $i);
index 5db2f9d06dd40f8ce9281e46d4c1eea7228f35fa..e3b0ab1fcddf684a6e85cc4cc3da6d96ff4b1e15 100644 (file)
@@ -58,6 +58,7 @@ function print_sales_quotations()
        if ($email == 0)
        {
                $rep = new FrontReport(_("SALES QUOTATION"), "SalesQuotationBulk", user_pagesize());
+               $rep->SetHeaderType('Header2');
                $rep->currency = $cur;
                $rep->Font();
                $rep->Info($params, $cols, null, $aligns);
@@ -72,13 +73,16 @@ function print_sales_quotations()
                if ($email == 1)
                {
                        $rep = new FrontReport("", "", user_pagesize());
+                       $rep->SetHeaderType('Header2');
                        $rep->currency = $cur;
                        $rep->Font();
                        $rep->filename = "SalesQuotation" . $i . ".pdf";
                        $rep->Info($params, $cols, null, $aligns);
                }
                $rep->title = _("SALES QUOTATION");
-               $rep->Header2($myrow, $branch, $myrow, $baccount, ST_SALESQUOTE);
+               $rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESQUOTE);
+               $rep->headerFunc = 'Header2';
+               $rep->NewPage();
 
                $result = get_sales_order_details($i, ST_SALESQUOTE);
                $SubTotal = 0;
@@ -107,7 +111,7 @@ function print_sales_quotations()
                        $rep->row = $newrow;
                        //$rep->NewLine(1);
                        if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight))
-                               $rep->Header2($myrow, $branch, $myrow, $baccount, ST_SALESQUOTE);
+                               $rep->NewPage();
                }
                if ($myrow['comments'] != "")
                {
index 87d87ce5881e3b3f6486c3364399a07a438b4c29..dd051b1c7f54411859790667b87baf7bc8844e67 100644 (file)
@@ -89,6 +89,7 @@ function print_receipts()
        $cur = get_company_Pref('curr_default');
 
        $rep = new FrontReport(_('RECEIPT'), "ReceiptBulk", user_pagesize());
+       $rep->SetHeaderType('Header2');
        $rep->currency = $cur;
        $rep->Font();
        $rep->Info($params, $cols, null, $aligns);
@@ -108,7 +109,8 @@ function print_receipts()
                        $params['bankaccount'] = $baccount['id'];
 
                        $rep->title = _('RECEIPT');
-                       $rep->Header2($myrow, null, $myrow, $baccount, ST_CUSTPAYMENT);
+                       $rep->SetCommonData($myrow, null, $myrow, $baccount, ST_CUSTPAYMENT);
+                       $rep->NewPage();
                        $result = get_allocations_for_receipt($myrow['debtor_no'], $myrow['type'], $myrow['trans_no']);
 
                        $linetype = true;
@@ -139,7 +141,7 @@ function print_receipts()
                                $total_allocated += $myrow2['amt'];
                                $rep->NewLine(1);
                                if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight))
-                                       $rep->Header2($myrow, null, $myrow, $baccount, ST_CUSTPAYMENT);
+                                       $rep->NewPage();
                        }
 
                        $rep->row = $rep->bottomMargin + (15 * $rep->lineHeight);
index 532da5fceeb789a3685bd248157feb96188ccf34..b176f2bdb8461591bb158f660df28944958fc3f1 100644 (file)
@@ -125,7 +125,7 @@ function print_supplier_balances()
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
-    $rep->Header();
+    $rep->NewPage();
 
        $total = array();
        $grandtotal = array(0,0,0,0);
index 3f68bb5adcbe094115247a67361dd382baeef146..b443e6d79579c7de37c91992476f66847f1669ab 100644 (file)
@@ -126,7 +126,7 @@ function print_aged_supplier_analysis()
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
-    $rep->Header();
+    $rep->NewPage();
 
        $total = array();
        $total[0] = $total[1] = $total[2] = $total[3] = $total[4] = 0.0;
@@ -237,7 +237,7 @@ function print_aged_supplier_analysis()
                $x = ($rep->pageWidth - $w) / 2;
                $rep->NewLine(2);
                if ($rep->row - $h < $rep->bottomMargin)
-                       $rep->Header();
+                       $rep->NewPage();
                $rep->AddImage($filename, $x, $rep->row - $h, $w, $h);
        }
     $rep->End();
index 27eef02b5dd538a10c2975d8f47bdf98dbe7b6e0..0a5ccca64105b6d418d1ead44273fea5088da9b6 100644 (file)
@@ -96,7 +96,7 @@ function print_payment_report()
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
-    $rep->Header();
+    $rep->NewPage();
 
        $total = array();
        $grandtotal = array(0,0);
index 2c8250cd3ba33d195ef7ce0aa277a227b02e5500..03d1cd864303d1e51979dda8ae29cfa40caee272 100644 (file)
@@ -91,7 +91,7 @@ function print_outstanding_GRN()
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
-    $rep->Header();
+    $rep->NewPage();
 
        $Tot_Val=0;
        $Supplier = '';
index 87b9f559a623ce49e356e5873f2dad1239f96c9b..57c55ae39d29a0a9a99b9b59195ad46d32d925f4 100644 (file)
@@ -83,6 +83,7 @@ function print_po()
        if ($email == 0)
        {
                $rep = new FrontReport(_('PURCHASE ORDER'), "PurchaseOrderBulk", user_pagesize());
+               $rep->SetHeaderType('Header2');
                $rep->currency = $cur;
                $rep->Font();
                $rep->Info($params, $cols, null, $aligns);
@@ -97,6 +98,7 @@ function print_po()
                if ($email == 1)
                {
                        $rep = new FrontReport("", "", user_pagesize());
+                       $rep->SetHeaderType('Header2');
                        $rep->currency = $cur;
                        $rep->Font();
                        $rep->title = _('PURCHASE ORDER');
@@ -105,7 +107,8 @@ function print_po()
                }
                else
                        $rep->title = _('PURCHASE ORDER');
-               $rep->Header2($myrow, null, $myrow, $baccount, ST_PURCHORDER);
+               $rep->SetCommonData($myrow, null, $myrow, $baccount, ST_PURCHORDER);
+               $rep->NewPage();
 
                $result = get_po_details($i);
                $SubTotal = 0;
@@ -139,7 +142,7 @@ function print_po()
                        $rep->TextCol(6, 7,     $DisplayNet, -2);
                        $rep->NewLine(1);
                        if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight))
-                               $rep->Header2($myrow, $branch, $myrow, $baccount, ST_PURCHORDER);
+                               $rep->NewPage();
                }
                if ($myrow['comments'] != "")
                {
index 27d56cd704a3ad7f51053bda7a44b284f37b04c4..376f1c87dca672b368c0236acd934e9705bd0d84 100644 (file)
@@ -91,6 +91,7 @@ function print_remittances()
        if ($email == 0)
        {
                $rep = new FrontReport(_('REMITTANCE'), "RemittanceBulk", user_pagesize());
+               $rep->SetHeaderType('Header2');
                $rep->currency = $cur;
                $rep->Font();
                $rep->Info($params, $cols, null, $aligns);
@@ -113,6 +114,7 @@ function print_remittances()
                        if ($email == 1)
                        {
                                $rep = new FrontReport("", "", user_pagesize());
+                               $rep->SetHeaderType('Header2');
                                $rep->currency = $cur;
                                $rep->Font();
                                $rep->title = _('REMITTANCE');
@@ -121,7 +123,8 @@ function print_remittances()
                        }
                        else
                                $rep->title = _('REMITTANCE');
-                       $rep->Header2($myrow, null, $myrow, $baccount, ST_SUPPAYMENT);
+                       $rep->SetCommonData($myrow, null, $myrow, $baccount, ST_SUPPAYMENT);
+                       $rep->NewPage();
                        $result = get_allocations_for_remittance($myrow['supplier_id'], $myrow['type'], $myrow['trans_no']);
 
                        $linetype = true;
@@ -152,7 +155,7 @@ function print_remittances()
                                $total_allocated += $myrow2['amt'];
                                $rep->NewLine(1);
                                if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight))
-                                       $rep->Header2($myrow, null, $myrow, $baccount, ST_SUPPAYMENT);
+                                       $rep->NewPage();
                        }
 
                        $rep->row = $rep->bottomMargin + (15 * $rep->lineHeight);
index 3b091cde1da032217492d436284d6a298829e37e..04ab84e92868f0f2c43b446ab34e00592adc5ac6 100644 (file)
@@ -107,7 +107,7 @@ function print_inventory_valuation_report()
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
-    $rep->Header();
+    $rep->NewPage();
 
        $res = getTransactions($category, $location);
        $total = $grandtotal = 0.0;
index 8e5bb6ddfd2e39e0898149e167842b5d82295df1..4c986ba9a977d8493a87dbc7e4e0479b88339342 100644 (file)
@@ -133,7 +133,7 @@ function print_inventory_planning()
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
-    $rep->Header();
+    $rep->NewPage();
 
        $res = getTransactions($category, $location);
        $catt = '';
index 25b7a68ca589dd9a1462cc6e5302e253dc895847..1cd151a62b34ce4c82dc7aaa6208328bd6e45218 100644 (file)
@@ -126,7 +126,7 @@ function print_stock_check()
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
-    $rep->Header();
+    $rep->NewPage();
 
        $res = getTransactions($category, $location);
        $catt = '';
@@ -180,7 +180,7 @@ function print_stock_check()
                        {
                                $rep->NewLine();
                                if ($rep->row - $pic_height < $rep->bottomMargin)
-                                       $rep->Header();
+                                       $rep->NewPage();
                                $rep->AddImage($image, $rep->cols[1], $rep->row - $pic_height, 0, $pic_height);
                                $rep->row -= $pic_height;
                                $rep->NewLine();
index f1262a1873730d0d5602e7d2769d647cec0feb90..624dabeaece0d8c437827b31532f7d95ddcfc14f 100644 (file)
@@ -127,7 +127,7 @@ function print_inventory_sales()
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
-    $rep->Header();
+    $rep->NewPage();
 
        $res = getTransactions($category, $location, $fromcust, $from, $to);
        $total = $grandtotal = 0.0;
index bfbaf6b01acc1e41f0494d72b798288d182b4d1a..5f180025e7241f78e33556690de010f84d66fdc7 100644 (file)
@@ -80,7 +80,7 @@ function print_grn_valuation()
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
-    $rep->Header();
+    $rep->NewPage();
 
        $res = getTransactions($from, $to);
        $total = $qtotal = $grandtotal = 0.0;
index e72f163ce02037886435cd3e2cfd9f77c0e893c6..341c2247a6655562c764e09d178f917de72bb363 100644 (file)
@@ -77,7 +77,7 @@ function print_bill_of_material()
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
-    $rep->Header();
+    $rep->NewPage();
 
        $res = getTransactions($frompart, $topart);
        $parent = '';
index bf6bb3d466fe0b75ac78b170a37df1718a8477bd..24d2cd82deb3f191c46e194677dbe268e85a4a5b 100644 (file)
@@ -63,6 +63,7 @@ function print_workorders()
        if ($email == 0)
        {
                $rep = new FrontReport(_('WORK ORDER'), "WorkOrderBulk", user_pagesize());
+               $rep->SetHeaderType('Header2');
                $rep->currency = $cur;
                $rep->Font();
                $rep->Info($params, $cols, null, $aligns);
@@ -77,6 +78,7 @@ function print_workorders()
                if ($email == 1)
                {
                        $rep = new FrontReport("", "", user_pagesize());
+                       $rep->SetHeaderType('Header2');
                        $rep->currency = $cur;
                        $rep->Font();
                                $rep->title = _('WORK ORDER');
@@ -85,7 +87,8 @@ function print_workorders()
                }
                else
                        $rep->title = _('WORK ORDER');
-               $rep->Header2($myrow, null, null, '', 26);
+               $rep->SetCommonData($myrow, null, null, '', 26);
+               $rep->NewPage();
 
                $result = get_wo_requirements($i);
                $rep->TextCol(0, 5,_("Work Order Requirements"), -2);
@@ -126,7 +129,7 @@ function print_workorders()
                        $rep->AmountCol(6, 7,   $myrow2['units_issued'], $dec, -2);
                        $rep->NewLine(1);
                        if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight))
-                               $rep->Header2($myrow, null, null,'',26);
+                               $rep->NewPage();
                }
                $rep->NewLine(1);
                $rep->TextCol(0, 5," *** = "._("Insufficient stock"), -2);
index 45047adc021cbac1139fcbda68595977e5394307..c3821e0be10ffecaa9468e94d5870ca147c962e5 100644 (file)
@@ -93,7 +93,7 @@ function print_dimension_summary()
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
-    $rep->Header();
+    $rep->NewPage();
 
        $res = getTransactions($fromdim, $todim);
        while ($trans=db_fetch($res))
index 7e443fb29b0cebacee938e6054a06ef1fbd0aac9..42c9ef30007820078c328edb8e9f12aadafe6df0 100644 (file)
@@ -84,7 +84,7 @@ function print_bank_transactions()
 
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns);
-       $rep->Header();
+       $rep->NewPage();
 
 
        $prev_balance = get_bank_balance_to($from, $account["id"]);
@@ -134,7 +134,7 @@ function print_bank_transactions()
                                if ($rep->row < $rep->bottomMargin + $rep->lineHeight)
                                {
                                        $rep->Line($rep->row - 2);
-                                       $rep->Header();
+                                       $rep->NewPage();
                                }
                        }
                        $rep->NewLine();
index 82bb0390ddc8e8db1c3a460458258992d1422a99..ca344f7964a0dd64db68a60b3508de7d58d6b21a 100644 (file)
@@ -111,7 +111,7 @@ function print_Chart_of_Accounts()
        
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns);
-       $rep->Header();
+       $rep->NewPage();
 
        $classresult = get_account_classes(false);
        while ($class = db_fetch($classresult))
index 10bcfef7fb8772fdc446113d0de92e4b5a8ca5ab..5a05470bb4dfa82954ee0e1b5cdf81a0cd6ce36e 100644 (file)
@@ -63,7 +63,7 @@ function print_list_of_journal_entries()
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
-    $rep->Header();
+    $rep->NewPage();
 
     if ($systype == -1)
         $systype = null;
index b6b12c38cf9204a65d29038435abb3eb5315375a..ff39ccd16cd99bfac58f8d27ceb2660401ff6259 100644 (file)
@@ -111,7 +111,7 @@ function print_GL_transactions()
 
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns);
-       $rep->Header();
+       $rep->NewPage();
 
        $accounts = get_gl_accounts($fromacc, $toacc);
 
@@ -167,7 +167,7 @@ function print_GL_transactions()
                                if ($rep->row < $rep->bottomMargin + $rep->lineHeight)
                                {
                                        $rep->Line($rep->row - 2);
-                                       $rep->Header();
+                                       $rep->NewPage();
                                }
                        }
                        $rep->NewLine();
index 2c14360d8aa08920bebafec8f9cafb916f631bbc..b2aaf68eca4d16f60d669acb7c5629b5adc45b96 100644 (file)
@@ -263,7 +263,7 @@ function print_annual_expense_breakdown()
 
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns);
-       $rep->Header();
+       $rep->NewPage();
 
        $sales = Array(1 => 0,0,0,0,0,0,0,0,0,0,0,0,0,0);
        
index e5cf4ce6bc03a159cf85baac84a8e1f8dd9d3ab7..529893d7d8031eb365e42765ccc02c0185ba551e 100644 (file)
@@ -200,7 +200,7 @@ function print_balance_sheet()
        $rep = new FrontReport(_('Balance Sheet'), "BalanceSheet", user_pagesize());
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns);
-       $rep->Header();
+       $rep->NewPage();
 
        $calc_open = $calc_period = 0.0;
        $equity_open = $equity_period = 0.0;
@@ -304,7 +304,7 @@ function print_balance_sheet()
                $x = ($rep->pageWidth - $w) / 2;
                $rep->NewLine(2);
                if ($rep->row - $h < $rep->bottomMargin)
-                       $rep->Header();
+                       $rep->NewPage();
                $rep->AddImage($filename, $x, $rep->row - $h, $w, $h);
        }
        $rep->End();
index 14112f24bd5674f1e1ad7e9567397a6671d62901..c4ef3b6d113a8cc0856d80ced414919764c4f6e7 100644 (file)
@@ -72,7 +72,7 @@ function display_type ($type, $typename, $from, $to, $begin, $end, $compare, $co
                if ($rep->row < $rep->bottomMargin + 3 * $rep->lineHeight)
                {
                        $rep->Line($rep->row - 2);
-                       $rep->Header();
+                       $rep->NewPage();
                }
 
                $code_per_balance += $per_balance;
@@ -243,7 +243,7 @@ function print_profit_and_loss_statement()
 
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns);
-       $rep->Header();
+       $rep->NewPage();
 
        $classper = 0.0;
        $classacc = 0.0;
@@ -323,7 +323,7 @@ function print_profit_and_loss_statement()
                $x = ($rep->pageWidth - $w) / 2;
                $rep->NewLine(2);
                if ($rep->row - $h < $rep->bottomMargin)
-                       $rep->Header();
+                       $rep->NewPage();
                $rep->AddImage($filename, $x, $rep->row - $h, $w, $h);
        }
                
index 9e95275a1373f8562d7bad0c1321e7053cf2064f..ee490c12c8703c050b18e6bd19d1097c40214153 100644 (file)
@@ -107,7 +107,7 @@ function print_trial_balance()
 
        $rep->Font();
        $rep->Info($params, $cols, $headers, $aligns, $cols2, $headers2, $aligns2);
-       $rep->Header();
+       $rep->NewPage();
 
        $accounts = get_gl_accounts();
 
@@ -165,7 +165,7 @@ function print_trial_balance()
                if ($rep->row < $rep->bottomMargin + $rep->lineHeight)
                {
                        $rep->Line($rep->row - 2);
-                       $rep->Header();
+                       $rep->NewPage();
                }
        }
        $rep->Line($rep->row);
index 3fc4c6375673372cf19974563a047c1fb5625ee0..d944960c87b16e97d4c9be84ecedd9adec0563e7 100644 (file)
@@ -107,7 +107,7 @@ function print_tax_report()
        $rep->Info($params, $cols, $headers, $aligns);
        if (!$summaryOnly)
        {
-               $rep->Header();
+               $rep->NewPage();
        }
        
        $totalnet = 0.0;
@@ -140,7 +140,7 @@ function print_tax_report()
                        if ($rep->row < $rep->bottomMargin + $rep->lineHeight)
                        {
                                $rep->Line($rep->row - 2);
-                               $rep->Header();
+                               $rep->NewPage();
                        }
                }
                if ($trans['trans_type']==ST_JOURNAL && $trans['amount']<0) {
@@ -170,7 +170,7 @@ function print_tax_report()
 
        $rep->headers = $headers2;
        $rep->aligns = $aligns2;
-       $rep->Header();
+       $rep->NewPage();
 
        $taxtotal = 0;
        foreach( $taxes as $id=>$sum)
index befed437404a9427be2555a011d8f8c1900e538f..06485b2c2b20b828c103703bf93ab236763cad15 100644 (file)
@@ -88,7 +88,7 @@ function print_audit_trail()
 
     $rep->Font();
     $rep->Info($params, $cols, $headers, $aligns);
-    $rep->Header();
+    $rep->NewPage();
 
     $trans = getTransactions($from, $to, $systype, $user);