X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep209.php;h=b59ca1ad8689f1f6a479a05e922c6397176af883;hb=b76384515a4eca6456b6f045836e3c913244c78f;hp=6ae258303147d1c9e62b557c352930eaa966237d;hpb=99730b8d6deb7e81d2f1ebeb2ce7066d27729485;p=fa-stable.git diff --git a/reporting/rep209.php b/reporting/rep209.php index 6ae25830..b59ca1ad 100644 --- a/reporting/rep209.php +++ b/reporting/rep209.php @@ -103,6 +103,19 @@ function print_po() $SubTotal = 0; while ($myrow2=db_fetch($result)) { + $data = get_purchase_data($myrow['supplier_id'], $myrow2['item_code']); + if ($data !== false) + { + if ($data['supplier_description'] != "") + $myrow2['description'] = $data['supplier_description']; + if ($data['suppliers_uom'] != "") + $myrow2['units'] = $data['suppliers_uom']; + if ($data['conversion_factor'] != 1) + { + $myrow2['unit_price'] = round($myrow2['unit_price'] / $data['conversion_factor'], user_price_dec()); + $myrow2['quantiry_ordered'] = round($myrow2['quantiry_ordered'] / $data['conversion_factor'], user_qty_dec()); + } + } $Net = round(($myrow2["unit_price"] * $myrow2["quantity_ordered"]), user_price_dec()); $SubTotal += $Net; @@ -111,14 +124,14 @@ function print_po() $DisplayNet = number_format2($Net,$dec); //$rep->TextCol(0, 1, $myrow2['item_code'], -2); $rep->TextCol(0, 2, $myrow2['description'], -2); - $rep->TextCol(2, 3, $myrow2['delivery_date'], -2); + $rep->TextCol(2, 3, sql2date($myrow2['delivery_date']), -2); $rep->TextCol(3, 4, $DisplayQty, -2); $rep->TextCol(4, 5, $myrow2['units'], -2); $rep->TextCol(5, 6, $DisplayPrice, -2); $rep->TextCol(6, 7, $DisplayNet, -2); $rep->NewLine(1); if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight)) - $rep->Header2($myrow, $branch, $sales_order, $baccount); + $rep->Header2($myrow, $branch, $myrow, $baccount, 8); } if ($myrow['comments'] != "") {