Page 1 of 1

Inventory Form - Stock Summary

PostPosted: Thu Feb 04, 2016 7:04 pm
by marcosomizu
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

Re: Inventory Form - Stock Summary  Topic is solved

PostPosted: Sun Feb 07, 2016 2:19 pm
by Mike.Sheen
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

Re: Inventory Form - Stock Summary

PostPosted: Mon Feb 08, 2016 3:13 pm
by marcosomizu
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!