Supplier credit duedate  Topic is solved

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

Supplier credit duedate

Postby perry » Fri Dec 17, 2021 4:11 pm

Hi

for Jiwa 7.2.1 SR4.

We've been asked to calculate the duedate on supplier credit as per supplier invoice.

However, I'm not able find how I can set the due date via plugin. The due date (on creditor transaction) is set to credit date and the creditorTransaction property is 'internal'.

So am I right that the DB trigger is the only possible solution?
Perry Ma
S. Programmer
Lonicera Pty Ltd
http://www.lonicera.com.au
perry
Frequent Contributor
Frequent Contributor
 
Posts: 173
Joined: Mon Oct 27, 2008 2:26 pm
Topics Solved: 15

Re: Supplier credit duedate  Topic is solved

Postby SBarnes » Fri Dec 17, 2021 5:26 pm

No you should be able to do it with reflection have a look at this post viewtopic.php?f=26&t=1139&hilit=SetPrivatePropertyValue and look for SetPrivatePropertyValue in the plugin where Mike did it.

Also this link shows you how to do it with a helper class using extension methods http://dotnetfollower.com/wordpress/201 ... eflection/
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: Supplier credit duedate

Postby perry » Wed Dec 22, 2021 11:45 am

Thanks! will give it a try in new year
Perry Ma
S. Programmer
Lonicera Pty Ltd
http://www.lonicera.com.au
perry
Frequent Contributor
Frequent Contributor
 
Posts: 173
Joined: Mon Oct 27, 2008 2:26 pm
Topics Solved: 15

Re: Supplier credit duedate

Postby perry » Wed Jan 19, 2022 4:08 pm

just confirming it was way to go!

Cant post the entire plugin here but it is simple as
- use the SaveEnding Event
- get _CreditorTransaction property and read trans ID
- append Update statement to the SQL transaction to update the duedate
Perry Ma
S. Programmer
Lonicera Pty Ltd
http://www.lonicera.com.au
perry
Frequent Contributor
Frequent Contributor
 
Posts: 173
Joined: Mon Oct 27, 2008 2:26 pm
Topics Solved: 15


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 5 guests