Optional printing item codes on purchase order report with config.php $show_po_item_codes
authorJanusz Dobrowolski <janusz@frontaccouting.eu>
Thu, 21 Apr 2011 13:39:38 +0000 (15:39 +0200)
committerJanusz Dobrowolski <janusz@frontaccouting.eu>
Thu, 21 Apr 2011 13:39:38 +0000 (15:39 +0200)
config.default.php
reporting/rep209.php

index 1d45c8b3aae8d61b7efcc2cc6f3a608bfda592b3..e10006e7f3c723b1553c89d88cf639e433050ac9 100644 (file)
@@ -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;
 
index e5094ebc9ca05d750700fc30448b5269bdd2be6c..a4e200ca16870b107e372e25446ed7bcbf571574 100644 (file)
@@ -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);