Sales Order Date Posted Override  Topic is solved

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

Sales Order Date Posted Override

Postby Professional » Tue Apr 19, 2016 2:50 pm

We have a plugin (see attached) to allow overriding the posting date on sales orders and set the system parameter to user defined.

Please see the attached for details of the issue.

Are you able to determine why it is picking up the wrong date posted?

Thanks,
Jeff
Attachments
PostedDate.PNG
Plugin Franklin - Unlock sales order user defined fields.xml
(80.19 KiB) Downloaded 499 times
Professional
Occasional Contributor
Occasional Contributor
 
Posts: 19
Joined: Mon Dec 08, 2008 3:45 pm

Re: Sales Order Date Posted Override  Topic is solved

Postby Scott.Pearce » Thu Apr 21, 2016 9:18 am

ugh, dealing with dates is always painful - I blame the Americans for writing them in a differing order.

Your plugin looks reasonable enough, although I do note some some inconsistency - in places the code is using "System.DateTime.Now" and in others it uses "System.DateTime.Today.ToString("dd/MM/yyyy")". Also I'd like to see some of the custom field contents - custom field contents is stored as string so it is possible to have a strange value that could conceivably convert to a crazy date. Also, I wonder if the system locale of the workstation is affecting the conversions - check that each workstation has it's system locale set to "English (Australia)" for each user, and also check the date formats (this is all done in Control Panel -> Region: Format/Additional Settings.../Location/
Administrative "Change System locale...").

It's a little hard to see in your attached screenshots, but does the "wrong" date look like a mangled conversion of the "correct" date (i.e. day and month reversed)? Are you able to find a pattern to the behaviour, i.e. does it only happen to a particular user, a particular workstation, for a particular type of invoice etc.? Are you able to get me I copy of the data so i can have a poke around? You could PM me a link to a password protected .rar file, or you could upload it to our ftp site (contact support if you need help doing this).

I also vaguely remember an issue we had a while ago where we found that a third party component would change the system locale for the jiwa process *if* it was accessed, and then never change it back to what it was (i.e. English Australia) - is something special happening with problem invoices like a cc payment popup is occurring or a paypal dll is being used?
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 765
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 230

Re: Sales Order Date Posted Override

Postby Mike.Sheen » Fri Apr 22, 2016 7:41 pm

Scott.Pearce wrote:I also vaguely remember an issue we had a while ago where we found that a third party component would change the system locale for the jiwa process *if* it was accessed, and then never change it back to what it was (i.e. English Australia) - is something special happening with problem invoices like a cc payment popup is occurring or a paypal dll is being used?


That was the PayPal Payflow Pro doing that - when sending CC payments via PayPal it would set the culture to be EN-US and not set it back. We managed to work around that in our PayPal plugin to get the culture info first, invoke the PayPal assembly then set it back to what it was. Finding the cause of the problem was the inverse of fun.

Nasty nasty stuff on PayPal's behalf.
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: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron