Page 1 of 1

custom due date calculation

PostPosted: Mon Mar 30, 2015 11:35 am
by perry
Hi,

Jiwa 7.0.115,

The requirement is to update the due date on dbtrans when Sales Order is being processed (i.e. due date will be recorded as custom field in SO History).

I'm thinking of using SalesOrder.JournalSet.SaveEnd, get DBTransID from SO History, read the transaction and update/save. However, I cannot find a read function on JiwaDebtors.DebtorTransaction object.
Also thought about Debtor.Transactions.SaveStart, though it doesn't quite make sense as I only care about transactions type of invoice.

Anyway, can you please point me to the right direction, sample plugin will be much appreciated.

Regards,

Re: custom due date calculation  Topic is solved

PostPosted: Wed Apr 01, 2015 4:51 pm
by Mike.Sheen
Hi Perry,

I'd simply issue an update to the DB_Trans table inside the ProcessingEnd event of the sales order.

A sample plugin demonstrating this is attached.

Mike

Plugin Set Due Date on Sales Order Process.xml
Sample Plugin
(35.39 KiB) Downloaded 673 times

Re: custom due date calculation

PostPosted: Thu Apr 02, 2015 10:28 am
by perry
Thanks