Order Units on Pack Sizes  Topic is solved

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

Order Units on Pack Sizes

Postby Sunny » Mon May 11, 2015 3:36 pm

Hi,
We are upgrading one of our customers from 6.5.13 to Version 7. One of the features required to be ported across is their ability to overwrite the pack order size populated by JIWA in the Qty field, if a product has Order Units in the Supply tab. Eg, If you have 576 order units on a part, when raising a new order, 576 is shown on the purchase order, you then enter eg. 590, then it will update the Qty to 1,152, which is correct. We require this field to be overwritten, if it is required to order an odd lot. This was achieved by a breakout written in the PurchaseOrderOrderLineChangedEvent as below:

PurchaseOrderObject.OrderLines(LineKey).OrderUnits = 1
End Sub

Screen Shot attached.
Have you created a Plugin for this behaviour as yet and if not can we have one please?

Thanks and Regards.
Sunny
Attachments
BreakoutPO_Qty.JPG
Sunny
Occasional Contributor
Occasional Contributor
 
Posts: 23
Joined: Mon May 11, 2015 1:38 pm
Topics Solved: 2

Re: Order Units on Pack Sizes  Topic is solved

Postby Mike.Sheen » Mon May 11, 2015 4:32 pm

Sunny wrote:Have you created a Plugin for this behaviour as yet and if not can we have one please?y


Hi Sunny,

As this is not a standard Jiwa feature in version 6 - but rather a customisation, we have not done a version 7 plugin for it.

It should be pretty simple, though - create a new plugin, add the purchase order Form to the forms tab, and in the Setup method of the FormPlugin class, add a handler for the Changed event of the Purchase Order Lines collection, and in that handler set the Order Units. Make sure you don't cause a stack overflow by setting the OrderUnits without first examining the PropertyName of the PropertyChangedEventArgs parameter (because setting the OrderUnits property inside a handler for the PO Lines changed event will cause in turn a Property changed event - it'll go around and around until your stack runs out of space).

Unfortunately, there is one small problem with this... the OrderUnits property of the Purchase Order Line class is read-only in version 7. I have logged this as bug 11707.

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: Order Units on Pack Sizes

Postby Sunny » Thu May 14, 2015 4:51 pm

Thanks Mike. Will give it a try.
Sunny
Sunny
Occasional Contributor
Occasional Contributor
 
Posts: 23
Joined: Mon May 11, 2015 1:38 pm
Topics Solved: 2


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 2 guests