From c0d0f5ef0aa80e792645dd0b2042acec503457d5 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Thu, 21 Apr 2011 15:39:38 +0200 Subject: [PATCH] Optional printing item codes on purchase order report with config.php $show_po_item_codes --- config.default.php | 3 +++ reporting/rep209.php | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/config.default.php b/config.default.php index 1d45c8b..e10006e 100644 --- a/config.default.php +++ b/config.default.php @@ -89,6 +89,9 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ /* show users online discretely in the footer */ $show_users_online = 0; + /* show item codes on purchase order */ + $show_po_item_codes = 0; + /* default print destination. 0 = PDF/Printer, 1 = Excel */ $def_print_destination = 0; diff --git a/reporting/rep209.php b/reporting/rep209.php index e5094eb..a4e200c 100644 --- a/reporting/rep209.php +++ b/reporting/rep209.php @@ -58,7 +58,7 @@ function get_po_details($order_no) function print_po() { - global $path_to_root; + global $path_to_root, $show_po_item_codes; include_once($path_to_root . "/reporting/includes/pdf_report.inc"); @@ -140,8 +140,11 @@ function print_po() $DisplayPrice = price_decimal_format($myrow2["unit_price"],$dec2); $DisplayQty = number_format2($myrow2["quantity_ordered"],get_qty_dec($myrow2['item_code'])); $DisplayNet = number_format2($Net,$dec); - //$rep->TextCol(0, 1, $myrow2['item_code'], -2); - $rep->TextCol(0, 2, $myrow2['description'], -2); + if ($show_po_item_codes) { + $rep->TextCol(0, 1, $myrow2['item_code'], -2); + $rep->TextCol(1, 2, $myrow2['description'], -2); + } else + $rep->TextCol(0, 2, $myrow2['description'], -2); $rep->TextCol(2, 3, sql2date($myrow2['delivery_date']), -2); $rep->TextCol(3, 4, $DisplayQty, -2); $rep->TextCol(4, 5, $myrow2['units'], -2); -- 2.30.2