Finalise Shipment event  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Finalise Shipment event

Postby neil.interactit » Fri Sep 15, 2023 10:37 am

Hi guys,

I try to avoid these basic questions, but I'm stuck on something simple.

A client has me building a "Deposit Payments" sub system that allows creditor payments made ahead of a purchase order fullfillment or before shipment to be linked to the relevent POs/Shipments. This part is done. The next stage of the project is that after "Finalise Shipment" completes, they want a popup "Allocate deposit payments for this shipment?" which then CreatesDialog<frmAllocations> on the debit transaction created during Finalise Shipment, pre-filled with the associated payments.

I have a handle on the frmAllocations aspect, and this all looks do-able. I am stuck injecting this after "Finalise Shipment" completes. I have not found a Finalising/Finalised event, so I have been tracing the Shipment.ActivateRecord() flow but can't spot where the debit transaction gets created, which I was hoping to then spot an event fired that I could hook to.

Could you point me in the right direction?

Cheers,
Neil
neil.interactit
Kohai
Kohai
 
Posts: 227
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6

Re: Finalise Shipment event  Topic is solved

Postby Scott.Pearce » Fri Sep 15, 2023 11:53 am

In SaveStart (or SaveEnding) look at Status and OriginalStatus. i.e. during save if the OriginalStatus is "BookingIn", and Status is "Closed", then that would indicate that the shipment is being finalised.

Sadly "OriginalStatus" is a friend so you will have to use reflection to look at it. Let me know if you need help doing this.
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 742
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221

Re: Finalise Shipment event

Postby Mike.Sheen » Fri Sep 15, 2023 12:02 pm

FYI this property has been made public in 7.2.1 SR18 - DEV-10306
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: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Finalise Shipment event

Postby neil.interactit » Fri Sep 15, 2023 12:57 pm

Thanks Scott/Mike.

When I was tracing this through I stumbled across property Finalising which is already public and is the logic you specified, so I should be good with that.

BTW Scott, I might look at developing a mashup interpretor for phpBB with https://www.developerfusion.com/tools/c ... to-csharp/, so that when you type friend, I read protected!

Cheers,
Neil
neil.interactit
Kohai
Kohai
 
Posts: 227
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 43 guests