Page 1 of 1

User Defined sales order PostingDateType

PostPosted: Wed Nov 11, 2015 1:42 pm
by Professional
Hi,

Client wants to change the posting date on some sales orders. They want the posting date to be the process date except where they want to enter a date. We can set up a date in custom fields but have you some sample code of how changing the posting date when we change the custom date and save the order should be done?

Thanks,
Jeff

Re: User Defined sales order PostingDateType

PostPosted: Fri Nov 13, 2015 10:32 am
by Scott.Pearce
Should be able to put something together for you pretty easily. But first, some clarification. In my demo database here, with whatever the default system settings are, I find that when I create and then process a sales order, the journal posting date is always the sales order Initiated Date (which is normally user editable). Is this true of the your Jiwa system?

Re: User Defined sales order PostingDateType

PostPosted: Fri Nov 13, 2015 3:31 pm
by Professional
Hi Scott,

They are on version 129. It does take into account the PostingDateType setting but you need to change the order after the setting has been changed. i.e. if its set for initiated date and then changed to process date you need to make some change to force a save on the order to get it to use process date as the posting date.
The user defined option would be good instead of using the initiated date just so they can keep track of when the order was initiated.

Thanks,
Jeff

Re: User Defined sales order PostingDateType

PostPosted: Fri Nov 13, 2015 4:35 pm
by Scott.Pearce
Ah. So tell me if this sounds suitable:

Create a custom field for sales orders
Ignore the initiated date *if* a valid date has been entered into the custom field
If not valid date is in the custom field, just let the system do what it normally does

You've missed the Friday train for this, but I'll get it done first thing Monday ;-)

Re: User Defined sales order PostingDateType

PostPosted: Mon Nov 16, 2015 11:27 am
by Scott.Pearce
I've gone ahead and created the plugin. Let me know if it suits.

Re: User Defined sales order PostingDateType

PostPosted: Wed Nov 18, 2015 12:48 pm
by Professional
Hi Scott,

Thanks for that. It is what is required but can it be made to apply the custom date when saved and not just when processed? The totals tab shows the current date as the posting date and the invoice shows the current date after the custom date has been changed and saved. It only changes the posting date and date on the invoice after Process has been clicked. The customer might print the invoice before actually clicking process.

Thanks,
Jeff

Re: User Defined sales order PostingDateType

PostPosted: Sat Feb 27, 2016 5:52 pm
by Mike.Sheen
Bumping as was never marked as solved.

Re: User Defined sales order PostingDateType  Topic is solved

PostPosted: Wed Mar 09, 2016 3:45 pm
by Mike.Sheen
The attached plugin extends the plugin Scott supplied and will set the DatePosted whenever the user keys it in - and it's shown immediately in the Date Posted field. When saved, it will save away the value. Once the sales order is processed, it will not modify the DatePosted field.

Plugin Sales Order Processing Date Override.xml
Revised Plugin
(37.24 KiB) Downloaded 720 times