Automating backorder processing in 7  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Automating backorder processing in 7

Postby pricerc » Wed Jun 07, 2017 10:04 pm

back in 2010, Mike provided some sample code for scheduled backorder processing https://forums.jiwa.com.au/viewtopic.php?f=14&t=111&p=308&hilit=JiwaBOProcess#p308.

Our client is on 7.0.157, and I see that the underlying business objects still look very Jiwa 6 (BOProcess.StdFunctions).

Has the process changed significantly, or should I be able to just port that old breakout code to .NET ?
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: Automating backorder processing in 7

Postby Mike.Sheen » Wed Jun 07, 2017 10:41 pm

pricerc wrote:back in 2010, Mike provided some sample code for scheduled backorder processing https://forums.jiwa.com.au/viewtopic.php?f=14&t=111&p=308&hilit=JiwaBOProcess#p308.

Our client is on 7.0.157, and I see that the underlying business objects still look very Jiwa 6 (BOProcess.StdFunctions).

Has the process changed significantly, or should I be able to just port that old breakout code to .NET ?


Oh, please don't port that old code!

Give me a few days and I'll provide a much cleaner solution for 7.00.157.00. I'll post back here the solution.
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: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: Automating backorder processing in 7

Postby pricerc » Thu Jun 08, 2017 7:47 am

LOL
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: Automating backorder processing in 7

Postby pricerc » Thu Jun 08, 2017 7:55 am

before you go doing an exact replacement for that old one, I better add some more background information.

I'm actually looking to automate the backorder release process from a shipment bookin activation.

I'm happy with getting a list of inventory items to be used in the BO process (the items on the bookin). I also see that we still have [usp_Jiwa_GetBackOrderProcessList] for getting invoice candidates, and I'm happy getting results back from a stored procedure.

So I'm mostly just looking for the correct way to handle the "BOProcessObject.ProcessBackOrdersForSingleSalesOrderUnattended" bit; I don't need *everything* from that old breakout.
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: Automating backorder processing in 7

Postby pricerc » Wed Jun 14, 2017 6:02 pm

Mike.Sheen wrote:
pricerc wrote:back in 2010, Mike provided some sample code for scheduled backorder processing https://forums.jiwa.com.au/viewtopic.php?f=14&t=111&p=308&hilit=JiwaBOProcess#p308.

Our client is on 7.0.157, and I see that the underlying business objects still look very Jiwa 6 (BOProcess.StdFunctions).

Has the process changed significantly, or should I be able to just port that old breakout code to .NET ?


Oh, please don't port that old code!

Give me a few days and I'll provide a much cleaner solution for 7.00.157.00. I'll post back here the solution.


Hi; I don't mean to sound impatient (although our customer is), but any ETA on that code?

thanks
/Ryan
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: Automating backorder processing in 7

Postby Mike.Sheen » Wed Jun 14, 2017 7:02 pm

Attached is a plugin which processes backorders when a shipment bookin is activated.

Unfortunately we don't have the mechanism in place to limit which backorders are processed - this has been added as DEV-6011.

Mike
Attachments
Plugin Process backorders on Shipment Bookin Activate.xml
Sample Plugin
(32.97 KiB) Downloaded 92 times
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: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: Automating backorder processing in 7

Postby pricerc » Wed Jun 14, 2017 7:18 pm

Thanks Mike, I'll check it out.
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: Automating backorder processing in 7

Postby pricerc » Wed Jun 14, 2017 7:51 pm

Mike.Sheen wrote:Unfortunately we don't have the mechanism in place to limit which backorders are processed



what about selective inventory? I see a SelectiveInventory flag and a InvSelections collection?
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: Automating backorder processing in 7  Topic is solved

Postby Mike.Sheen » Wed Jun 14, 2017 8:16 pm

pricerc wrote:what about selective inventory? I see a SelectiveInventory flag and a InvSelections collection?


Yes - that's possible - this will get passed to the stored procedure used to get the items to process.

I've updated the plugin (attached) to do this. I've also shown how you can override the stored procedure invoked (but commented that line out).

The relevant bit changed is as follows:

Code: Select all
// Process backorders
JiwaFinancials.Jiwa.JiwaBOProcess.StdFunctions boProcess = JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance.BusinessLogicFactory.CreateBusinessLogic<JiwaFinancials.Jiwa.JiwaBOProcess.StdFunctions>(null);
boProcess.SetupProcessBackOrdersUnattended();
boProcess.SelectiveInventory = true;
//boProcess.StoredProcName = "your_sp_name"; // Make sure this accepts the same parameters as usp_Jiwa_GetBackOrderProcessList, and also returns an identical set of columns

// Filter only the inventory items on the BookIn
foreach(JiwaFinancials.Jiwa.JiwaLandedCost.BookIn.Line bookInLine in bookIn.Lines)
{
   JiwaFinancials.Jiwa.JiwaBOProcess.clsInventorySelection inventoryItem = new JiwaFinancials.Jiwa.JiwaBOProcess.clsInventorySelection() { InventoryID = bookInLine.Inventory.InventoryID, PartNo = bookInLine.Inventory.PartNo, Description = bookInLine.Inventory.Description };
   boProcess.InvSelections.AddItem(ref inventoryItem);
}
boProcess.Process();
Attachments
Plugin Process backorders on Shipment Bookin Activate.xml
(33.19 KiB) Downloaded 131 times
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: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: Automating backorder processing in 7

Postby pricerc » Wed Jun 14, 2017 8:26 pm

Cool.

and now for the next tricky bit. Not sure why I didn't think to ask this question earlier as well:

Can I get a list of orders that were released by the process so that I can send them to printers and/or EDI?

Or can I build/process the list myself using the ProcessSnapshotCreated event?
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Next

Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 1 guest