X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep209.php;h=ce15c150d07595f432bac261ea8d2dd6a975aa00;hb=9561c66909d960cd75bcbb08bae2132f3de7e6da;hp=0e83fc0103da5d532dc00cbe2cfe9f0532976c2e;hpb=95ff74b5722826544743a01daf527aa3c9efe11a;p=fa-stable.git diff --git a/reporting/rep209.php b/reporting/rep209.php index 0e83fc01..ce15c150 100644 --- a/reporting/rep209.php +++ b/reporting/rep209.php @@ -31,7 +31,7 @@ include_once($path_to_root . "/taxes/tax_calc.inc"); print_po(); //---------------------------------------------------------------------------------------------------- -function get_po($order_no) +function get_supp_po($order_no) { $sql = "SELECT po.*, supplier.supp_name, supplier.supp_account_no,supplier.tax_included, supplier.gst_no AS tax_id, @@ -49,7 +49,7 @@ function get_po($order_no) function get_po_details($order_no) { - $sql = "SELECT poline.*, units + $sql = "SELECT poline.*, units, editable FROM ".TB_PREF."purch_order_details poline LEFT JOIN ".TB_PREF."stock_master item ON poline.item_code=item.stock_id WHERE order_no =".db_escape($order_no)." "; @@ -91,7 +91,7 @@ function print_po() for ($i = $from; $i <= $to; $i++) { - $myrow = get_po($i); + $myrow = get_supp_po($i); if ($currency != ALL_TEXT && $myrow['curr_code'] != $currency) { continue; } @@ -121,7 +121,8 @@ function print_po() $data = get_purchase_data($myrow['supplier_id'], $myrow2['item_code']); if ($data !== false) { - if ($data['supplier_description'] != "") + if (!$myrow2['editable'] && $data['supplier_description'] != "" && + $myrow2['description'] != $data['supplier_description']) // backward compatibility $myrow2['description'] = $data['supplier_description']; if ($data['suppliers_uom'] != "") $myrow2['units'] = $data['suppliers_uom']; @@ -156,7 +157,7 @@ function print_po() if ($myrow['comments'] != "") { $rep->NewLine(); - $rep->TextColLines(1, 5, $myrow['comments'], -2); + $rep->TextColLines(1, 4, $myrow['comments'], -2); } $DisplaySubTot = number_format2($SubTotal,$dec); @@ -176,10 +177,7 @@ function print_po() continue; $DisplayTax = number_format2($tax_item['Value'], $dec); - if ($SysPrefs->suppress_tax_rates() == 1) - $tax_type_name = $tax_item['tax_type_name']; - else - $tax_type_name = $tax_item['tax_type_name']." (".$tax_item['rate']."%) "; + $tax_type_name = $tax_item['tax_type_name']; if ($myrow['tax_included']) { @@ -188,7 +186,7 @@ function print_po() if ($first) { $rep->TextCol(3, 6, _("Total Tax Excluded"), -2); - $rep->TextCol(6, 7, number_format2($sign*$tax_item['net_amount'], $dec), -2); + $rep->TextCol(6, 7, number_format2($tax_item['net_amount'], $dec), -2); $rep->NewLine(); } $rep->TextCol(3, 6, $tax_type_name, -2);