Overide Inventory Decimals St.Proc  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Overide Inventory Decimals St.Proc

Postby 2can2 » Wed Sep 10, 2014 12:38 pm

Hi, We have modified the standard stored proc usp_Jiwa_Warehouse_SOH_Summary to add an extra column (Tot KG) to the form.
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. Thanks.
2can2
Frequent Contributor
Frequent Contributor
 
Posts: 171
Joined: Tue Feb 26, 2008 10:24 am
Topics Solved: 25

Re: Overide Inventory Decimals St.Proc  Topic is solved

Postby Mike.Sheen » Fri Sep 12, 2014 5:23 pm

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.

Plugin Warehouse SOH Column to 2 Decimals.xml
Sample Plugin
(31.34 KiB) Downloaded 275 times


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.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2476
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 766

Re: Overide Inventory Decimals St.Proc

Postby 2can2 » Tue Sep 30, 2014 9:11 am

Thanks for the detail!
2can2
Frequent Contributor
Frequent Contributor
 
Posts: 171
Joined: Tue Feb 26, 2008 10:24 am
Topics Solved: 25


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 3 guests

cron