2can2 wrote:Is there any way to override the standard Inventory Decimal Places default for this one column on Display.
Most Inventory items have 0 decimal places BUT this field needs to be displayed as 2 decimals immaterial of the Inventory setting.
Hi Doug,
Yes there is - but be aware in the next build (07.00.80.00) as part of addressing bug
10759 - we have changed the framework used to display the information from usp_JIWA_Warehouse_SOH_Summary on the inventory maintenance form. This means you will have to re-apply your changes to the new stored procedure. The new changes include the ability to specify the decimal places for each column or cell of the grid, as well as adding drill-down abilities.
So, in version 07.00.80.00 and later, you can control the decimals easily from the stored procedure. In previous versions you'd have to do something like this after the warehouse summary data was displayed:
- Code: Select all
For row As Integer = 0 To inventoryForm.grdWarehouseSummary.ActiveSheet.RowCount - 1
inventoryForm.grdWarehouseSummary.GridDecimalPlaces("TotalSOH", row, 2)
Next
When this grid is populated is a bit tricky - we do a lazy load for this data and quite a few other tabs - what that means is we don't even call the stored procedure or populate the grid, unless the tab was visible at the time the item was read. So, to handle this you will need to set the decimals also when the user clicks a tab, and work out if the warehouse summary tab was visible.
Attached is a plugin which demonstrates this.
And remember - in version 07.00.80.00 and later you won't need this plugin at all - the stored procedure will take care of decimal precision.