Inventory Form - Stock Summary  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Inventory Form - Stock Summary

Postby marcosomizu » Thu Feb 04, 2016 7:04 pm

Hi,

I've created a plugin that adds up 3 new columns to the Stock Summary on the Inventory Console Tab.

I am doing this through the Load + Inventory.ReadEnd events. It works perfectly, but the problem is: when I go to the next Inventory Item or the previous Inventory Item, it looses the 3 new columns, even with the code being in the ReadEnd event.

I've noticed that if I put a breakpoint at the ReadEnd event, what happens is that the 3 columns are created - but at this stage, the Stock Summary Grid is not updated yet -, and when you release the breakpoint, the Stock Summary Grid is updated but losing the 3 columns.

I think it is just a matter of finding the right event to make it work allright.

Could anyone help me?

Cheers
marcosomizu
Occasional Contributor
Occasional Contributor
 
Posts: 23
Joined: Mon Sep 07, 2015 12:01 pm
Topics Solved: 1

Re: Inventory Form - Stock Summary  Topic is solved

Postby Mike.Sheen » Sun Feb 07, 2016 2:19 pm

marcosomizu wrote:I've noticed that if I put a breakpoint at the ReadEnd event, what happens is that the 3 columns are created - but at this stage, the Stock Summary Grid is not updated yet -, and when you release the breakpoint, the Stock Summary Grid is updated but losing the 3 columns.

I think it is just a matter of finding the right event to make it work allright.

Could anyone help me?

Cheers


Hi marcosomizu,

Make sure your plugin has its execution order to be greater than the execution order of the "Inventory Console" plugin - as then it will be invoked after that plugin has built the grid.

Another way to do what you want is to not use a plugin, but instead use a modified stored procedure. The warehouse summary used by both that plugin and the standard "Warehouse Summary" tab of inventory maintenance is controlled by a stored procedure. There is a system setting controlling what stored procedure to use - by default it is "usp_Jiwa_Warehouse_SOH_Summary" - you can copy that, add your desired columns and then change the system setting (Under System Settings -> System Configuration -> Inventory -> WarehouseSummaryStoredProcedureName) to be your new stored procedure.



If this still doesn't help, post a stripped down version of your plugin which exhibits the problem and we'll be able to give you a solution.

Mike
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: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Inventory Form - Stock Summary

Postby marcosomizu » Mon Feb 08, 2016 3:13 pm

Thanks Mike!

I've removed my new plugin and made all the necessary changes into the "Inventory Console" plugin and created a new version of the Warehouse_SOH_Summary Stored Procedure. Everything is working fine.

Cheers!
marcosomizu
Occasional Contributor
Occasional Contributor
 
Posts: 23
Joined: Mon Sep 07, 2015 12:01 pm
Topics Solved: 1


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 0 guests