X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=reporting%2Frep306.php;h=94bca60ab18f1515dd9143fa8860bef09cf574c5;hb=a53ada1fa7eac32d429456e08f5ac7fb753ebc0d;hp=4a5a4ed705945e9e11ac003d49cae61aa1d6bf55;hpb=b0f87684172a3929f600dda9752db8d466032190;p=fa-stable.git diff --git a/reporting/rep306.php b/reporting/rep306.php index 4a5a4ed7..94bca60a 100644 --- a/reporting/rep306.php +++ b/reporting/rep306.php @@ -153,7 +153,7 @@ function print_inventory_purchase() $rep = new FrontReport(_('Inventory Purchasing Report'), "InventoryPurchasingReport", user_pagesize(), 9, $orientation); if ($orientation == 'L') - $rep->recalculate_cols($cols); + recalculate_cols($cols); $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); @@ -163,7 +163,7 @@ function print_inventory_purchase() $total = $total_supp = $grandtotal = 0.0; $total_qty = 0.0; - $catt = $stock_description = $supplier_name = ''; + $catt = $stock_description = $stock_id = $supplier_name = ''; while ($trans=db_fetch($res)) { if ($stock_description != $trans['description']) @@ -176,7 +176,7 @@ function print_inventory_purchase() $rep->TextCol(0, 1, _('Total')); $rep->TextCol(1, 4, $stock_description); $rep->TextCol(4, 5, $supplier_name); - $rep->TextCol(5, 7, $total_qty); + $rep->AmountCol(5, 7, $total_qty, get_qty_dec($stock_id)); $rep->AmountCol(7, 8, $total_supp, $dec); $rep->Line($rep->row - 2); $rep->NewLine(); @@ -184,6 +184,7 @@ function print_inventory_purchase() $supplier_name = $trans['supplier_name']; } } + $stock_id = $trans['stock_id']; $stock_description = $trans['description']; } @@ -195,7 +196,7 @@ function print_inventory_purchase() $rep->TextCol(0, 1, _('Total')); $rep->TextCol(1, 4, $stock_description); $rep->TextCol(4, 5, $supplier_name); - $rep->TextCol(5, 7, $total_qty); + $rep->AmountCol(5, 7, $total_qty, get_qty_dec($stock_id)); $rep->AmountCol(7, 8, $total_supp, $dec); $rep->Line($rep->row - 2); $rep->NewLine(); @@ -232,14 +233,14 @@ function print_inventory_purchase() if ($fromsupp == ALL_TEXT) { $rep->TextCol(1, 2, $trans['description'].($trans['inactive']==1 ? " ("._("Inactive").")" : ""), -1); - $rep->TextCol(2, 3, $trans['tran_date']); + $rep->TextCol(2, 3, sql2date($trans['tran_date'])); $rep->TextCol(3, 4, $trans['supp_reference']); $rep->TextCol(4, 5, $trans['supplier_name']); } else { $rep->TextCol(1, 2, $trans['description'].($trans['inactive']==1 ? " ("._("Inactive").")" : ""), -1); - $rep->TextCol(2, 3, $trans['tran_date']); + $rep->TextCol(2, 3, sql2date($trans['tran_date'])); $rep->TextCol(3, 4, $trans['supp_reference']); } $rep->AmountCol(5, 6, $trans['qty'], get_qty_dec($trans['stock_id'])); @@ -260,7 +261,7 @@ function print_inventory_purchase() $rep->TextCol(0, 1, _('Total')); $rep->TextCol(1, 4, $stock_description); $rep->TextCol(4, 5, $supplier_name); - $rep->TextCol(5, 7, $total_qty); + $rep->AmountCol(5, 7, $total_qty, get_qty_dec($stock_id)); $rep->AmountCol(7, 8, $total_supp, $dec); $rep->Line($rep->row - 2); $rep->NewLine(); @@ -275,7 +276,7 @@ function print_inventory_purchase() $rep->TextCol(0, 1, _('Total')); $rep->TextCol(1, 4, $stock_description); $rep->TextCol(4, 5, $supplier_name); - $rep->TextCol(5, 7, $total_qty); + $rep->AmountCol(5, 7, $total_qty, get_qty_dec($stock_id)); $rep->AmountCol(7, 8, $total_supp, $dec); $rep->Line($rep->row - 2); $rep->NewLine();