From: Janusz Dobrowolski Date: Thu, 21 Apr 2011 13:39:38 +0000 (+0200) Subject: Optional printing item codes on purchase order report with config.php $show_po_item_codes X-Git-Tag: 2.3-final~692 X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=56488e0870fed91a57bfc0b67e81703d8dcd1e56 Optional printing item codes on purchase order report with config.php $show_po_item_codes --- diff --git a/config.default.php b/config.default.php index 1d45c8b3..e10006e7 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 e5094ebc..a4e200ca 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);