by 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