From b37623cf1de2cfce6825744557d76475f002321f Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Mon, 1 Mar 2010 09:54:59 +0000 Subject: [PATCH] Report fixed according to changed headers API in FrontReport class. --- reporting/rep101.php | 4 +--- reporting/rep102.php | 4 ++-- reporting/rep103.php | 2 +- reporting/rep104.php | 4 ++-- reporting/rep105.php | 6 +++--- reporting/rep106.php | 6 +++--- reporting/rep107.php | 7 +++++-- reporting/rep108.php | 7 +++++-- reporting/rep109.php | 7 +++++-- reporting/rep110.php | 7 +++++-- reporting/rep111.php | 8 ++++++-- reporting/rep112.php | 6 ++++-- reporting/rep201.php | 2 +- reporting/rep202.php | 4 ++-- reporting/rep203.php | 2 +- reporting/rep204.php | 2 +- reporting/rep209.php | 7 +++++-- reporting/rep210.php | 7 +++++-- reporting/rep301.php | 2 +- reporting/rep302.php | 2 +- reporting/rep303.php | 4 ++-- reporting/rep304.php | 2 +- reporting/rep305.php | 2 +- reporting/rep401.php | 2 +- reporting/rep409.php | 7 +++++-- reporting/rep501.php | 2 +- reporting/rep601.php | 4 ++-- reporting/rep701.php | 2 +- reporting/rep702.php | 2 +- reporting/rep704.php | 4 ++-- reporting/rep705.php | 2 +- reporting/rep706.php | 4 ++-- reporting/rep707.php | 6 +++--- reporting/rep708.php | 4 ++-- reporting/rep709.php | 6 +++--- reporting/rep710.php | 2 +- 36 files changed, 88 insertions(+), 63 deletions(-) diff --git a/reporting/rep101.php b/reporting/rep101.php index 772d33f0..6ae11387 100644 --- a/reporting/rep101.php +++ b/reporting/rep101.php @@ -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 "; diff --git a/reporting/rep102.php b/reporting/rep102.php index 70ed5671..a2f938c0 100644 --- a/reporting/rep102.php +++ b/reporting/rep102.php @@ -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(); diff --git a/reporting/rep103.php b/reporting/rep103.php index 8ee0abbe..db9b8815 100644 --- a/reporting/rep103.php +++ b/reporting/rep103.php @@ -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); diff --git a/reporting/rep104.php b/reporting/rep104.php index d6249e0d..2c34f63a 100644 --- a/reporting/rep104.php +++ b/reporting/rep104.php @@ -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(); diff --git a/reporting/rep105.php b/reporting/rep105.php index 4b6a086c..e0dd5036 100644 --- a/reporting/rep105.php +++ b/reporting/rep105.php @@ -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); diff --git a/reporting/rep106.php b/reporting/rep106.php index 4aac08ab..42a02083 100644 --- a/reporting/rep106.php +++ b/reporting/rep106.php @@ -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; diff --git a/reporting/rep107.php b/reporting/rep107.php index e3bd2065..91c7a8d3 100644 --- a/reporting/rep107.php +++ b/reporting/rep107.php @@ -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); diff --git a/reporting/rep108.php b/reporting/rep108.php index 81e3bb7f..56a09b4d 100644 --- a/reporting/rep108.php +++ b/reporting/rep108.php @@ -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; diff --git a/reporting/rep109.php b/reporting/rep109.php index 2c3bb116..96b972ed 100644 --- a/reporting/rep109.php +++ b/reporting/rep109.php @@ -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'] != "") { diff --git a/reporting/rep110.php b/reporting/rep110.php index 31169780..05bb3048 100644 --- a/reporting/rep110.php +++ b/reporting/rep110.php @@ -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); diff --git a/reporting/rep111.php b/reporting/rep111.php index 5db2f9d0..e3b0ab1f 100644 --- a/reporting/rep111.php +++ b/reporting/rep111.php @@ -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'] != "") { diff --git a/reporting/rep112.php b/reporting/rep112.php index 87d87ce5..dd051b1c 100644 --- a/reporting/rep112.php +++ b/reporting/rep112.php @@ -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); diff --git a/reporting/rep201.php b/reporting/rep201.php index 532da5fc..b176f2bd 100644 --- a/reporting/rep201.php +++ b/reporting/rep201.php @@ -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); diff --git a/reporting/rep202.php b/reporting/rep202.php index 3f68bb5a..b443e6d7 100644 --- a/reporting/rep202.php +++ b/reporting/rep202.php @@ -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(); diff --git a/reporting/rep203.php b/reporting/rep203.php index 27eef02b..0a5ccca6 100644 --- a/reporting/rep203.php +++ b/reporting/rep203.php @@ -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); diff --git a/reporting/rep204.php b/reporting/rep204.php index 2c8250cd..03d1cd86 100644 --- a/reporting/rep204.php +++ b/reporting/rep204.php @@ -91,7 +91,7 @@ function print_outstanding_GRN() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $Tot_Val=0; $Supplier = ''; diff --git a/reporting/rep209.php b/reporting/rep209.php index 87b9f559..57c55ae3 100644 --- a/reporting/rep209.php +++ b/reporting/rep209.php @@ -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'] != "") { diff --git a/reporting/rep210.php b/reporting/rep210.php index 27d56cd7..376f1c87 100644 --- a/reporting/rep210.php +++ b/reporting/rep210.php @@ -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); diff --git a/reporting/rep301.php b/reporting/rep301.php index 3b091cde..04ab84e9 100644 --- a/reporting/rep301.php +++ b/reporting/rep301.php @@ -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; diff --git a/reporting/rep302.php b/reporting/rep302.php index 8e5bb6dd..4c986ba9 100644 --- a/reporting/rep302.php +++ b/reporting/rep302.php @@ -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 = ''; diff --git a/reporting/rep303.php b/reporting/rep303.php index 25b7a68c..1cd151a6 100644 --- a/reporting/rep303.php +++ b/reporting/rep303.php @@ -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(); diff --git a/reporting/rep304.php b/reporting/rep304.php index f1262a18..624dabea 100644 --- a/reporting/rep304.php +++ b/reporting/rep304.php @@ -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; diff --git a/reporting/rep305.php b/reporting/rep305.php index bfbaf6b0..5f180025 100644 --- a/reporting/rep305.php +++ b/reporting/rep305.php @@ -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; diff --git a/reporting/rep401.php b/reporting/rep401.php index e72f163c..341c2247 100644 --- a/reporting/rep401.php +++ b/reporting/rep401.php @@ -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 = ''; diff --git a/reporting/rep409.php b/reporting/rep409.php index bf6bb3d4..24d2cd82 100644 --- a/reporting/rep409.php +++ b/reporting/rep409.php @@ -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); diff --git a/reporting/rep501.php b/reporting/rep501.php index 45047adc..c3821e0b 100644 --- a/reporting/rep501.php +++ b/reporting/rep501.php @@ -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)) diff --git a/reporting/rep601.php b/reporting/rep601.php index 7e443fb2..42c9ef30 100644 --- a/reporting/rep601.php +++ b/reporting/rep601.php @@ -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(); diff --git a/reporting/rep701.php b/reporting/rep701.php index 82bb0390..ca344f79 100644 --- a/reporting/rep701.php +++ b/reporting/rep701.php @@ -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)) diff --git a/reporting/rep702.php b/reporting/rep702.php index 10bcfef7..5a05470b 100644 --- a/reporting/rep702.php +++ b/reporting/rep702.php @@ -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; diff --git a/reporting/rep704.php b/reporting/rep704.php index b6b12c38..ff39ccd1 100644 --- a/reporting/rep704.php +++ b/reporting/rep704.php @@ -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(); diff --git a/reporting/rep705.php b/reporting/rep705.php index 2c14360d..b2aaf68e 100644 --- a/reporting/rep705.php +++ b/reporting/rep705.php @@ -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); diff --git a/reporting/rep706.php b/reporting/rep706.php index e5cf4ce6..529893d7 100644 --- a/reporting/rep706.php +++ b/reporting/rep706.php @@ -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(); diff --git a/reporting/rep707.php b/reporting/rep707.php index 14112f24..c4ef3b6d 100644 --- a/reporting/rep707.php +++ b/reporting/rep707.php @@ -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); } diff --git a/reporting/rep708.php b/reporting/rep708.php index 9e95275a..ee490c12 100644 --- a/reporting/rep708.php +++ b/reporting/rep708.php @@ -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); diff --git a/reporting/rep709.php b/reporting/rep709.php index 3fc4c637..d944960c 100644 --- a/reporting/rep709.php +++ b/reporting/rep709.php @@ -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) diff --git a/reporting/rep710.php b/reporting/rep710.php index befed437..06485b2c 100644 --- a/reporting/rep710.php +++ b/reporting/rep710.php @@ -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); -- 2.30.2