From 905e650ba6413f28f4dbd24104c1f56e1f05126b Mon Sep 17 00:00:00 2001 From: Paul Becker Date: Tue, 27 Feb 2018 11:26:13 +0000 Subject: [PATCH] Paul Becker (PaulT commit): AgedControlledInventory.php: Add UOM to output. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8091&pid=14286#pid14286) Signed-off-by: Paul Thursby --- AgedControlledInventory.php | 35 +++++++++++++++++++---------------- doc/Change.log | 1 + 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/AgedControlledInventory.php b/AgedControlledInventory.php index b82c41ac0..20ad3e21f 100644 --- a/AgedControlledInventory.php +++ b/AgedControlledInventory.php @@ -11,8 +11,7 @@ include('includes/header.php'); echo '

- ' . $Title. ' + ', $Title, '

'; $sql = "SELECT stockserialitems.stockid, @@ -20,6 +19,7 @@ stockserialitems.serialno, stockserialitems.quantity, stockmoves.trandate, + stockmaster.units, stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost AS cost, createdate, decimalplaces @@ -46,24 +46,25 @@ echo ' - - - - - - - + + + + + + + + '; while ($LocQtyRow=DB_fetch_array($LocStockResult)) { - $DaysOld=floor(($Today - strtotime($LocQtyRow['createdate']))/(60*60*24)); - $TotalQty +=$LocQtyRow['quantity']; + $DaysOld = floor(($Today - strtotime($LocQtyRow['createdate']))/(60*60*24)); + $TotalQty += $LocQtyRow['quantity']; $DispVal = '-----------'; if (in_array($PricesSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PricesSecurity)) { - $DispVal =locale_number_format(($LocQtyRow['quantity']*$LocQtyRow['cost']),$LocQtyRow['decimalplaces']); - $TotalVal +=($LocQtyRow['quantity'] *$LocQtyRow['cost']); + $DispVal = locale_number_format(($LocQtyRow['quantity']*$LocQtyRow['cost']),$LocQtyRow['decimalplaces']); + $TotalVal += ($LocQtyRow['quantity'] * $LocQtyRow['cost']); } printf(' @@ -71,6 +72,7 @@ + @@ -79,6 +81,7 @@ $LocQtyRow['description'], $LocQtyRow['serialno'], locale_number_format($LocQtyRow['quantity'],$LocQtyRow['decimalplaces']), + $LocQtyRow['units'], $DispVal, ConvertSQLDate($LocQtyRow['createdate']), $DaysOld @@ -87,9 +90,9 @@ echo ' - - - + + + diff --git a/doc/Change.log b/doc/Change.log index 772eb8bfa..eafc944d5 100644 --- a/doc/Change.log +++ b/doc/Change.log @@ -1,5 +1,6 @@ webERP Change Log +16/2/18 Paul Becker (PaulT commit): AgedControlledInventory.php: Add UOM to output. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8091&pid=14286#pid14286) 16/2/18 Paul Becker (PaulT commit): Z_ChangeSalesmanCode.php: New script to change a salesman code. (Forum contribution: http://www.weberp.org/forum/showthread.php?tid=8094) 13/2/18 Paul Becker (PaulT commit): InternalStockRequestFulfill.php: Minor change to remove number from input field committed with 7946, and add attributes on two input fields. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8089&pid=14266#pid14266) 12/2/18 PaulT: Remove $db parameter from PeriodExists(), CreatePeriod(), CalcFreightCost(), CheckForRecursiveBOM(), DisplayBOMItems() and a few other functions.
' . _('Stock') . '' . _('Description') . '' . _('Batch') . '' . _('Quantity Remaining') . '' . _('Inventory Value') . '' . _('Date') . '' . _('Days Old') . '', _('Stock'), '', _('Description'), '', _('Batch'), '', _('Quantity Remaining'), '', _('Units'), '', _('Inventory Value'), '', _('Date'), '', _('Days Old'), '
%s %s %s%s %s %s %s
' . _('Total') . '' . locale_number_format($TotalQty,2) . '' . locale_number_format($TotalVal,2) . '', _('Total'), '', locale_number_format($TotalQty,2), '', locale_number_format($TotalVal,2), '