Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unknown Date Format
02-04-2020, 04:38 AM
Post: #1
Unknown Date Format
I just upgraded to the latest version 4.15.1. When I click on the StockMovements.php script, nothing shows in the table and I get an error, "invalid date format", when I click on the dates. If I replace the script with my old script (4.14.1), It works fine. Do I have a setting somewhere that needs to be updated?

Thanks
Find all posts by this user
Quote this message in a reply
02-04-2020, 09:10 AM
Post: #2
RE: Unknown Date Format
Can you clear cache and check again?

There was a change to the date handling between versions.

This has been the only report that I know (so far), but I'll check that script tonight to be sure.
(are there any customized script changes on your end?)
Find all posts by this user
Quote this message in a reply
02-04-2020, 10:08 AM
Post: #3
RE: Unknown Date Format
I tried clearing the cache and tried it in private browsing mode also. It didn't make any difference. I haven't done any modifications of the scripts.
Find all posts by this user
Quote this message in a reply
02-04-2020, 11:26 AM (This post was last modified: 02-04-2020 12:05 PM by TurboPT.)
Post: #4
RE: Unknown Date Format
Can you check the system parameters screen to see if the Default Date Format is set?

It is the first option on the screen at menu: Setup => System Parameters (link is in the first column of the Setup menu)

If not set, please choose one and save. You may need to logout/login to get the setting loaded.

=====

Other than that, if there is still trouble:

Can you copy lines 76-80 from the file and paste it here?

I'm not showing any trouble with the dates.

The lines should have attribute class="date" within the lines, in case yours may be off a line or two.
Find all posts by this user
Quote this message in a reply
02-04-2020, 06:05 PM
Post: #5
RE: Unknown Date Format
Just to confirm Brian, the error message appears when you click inside the date field, when you would expect the date picker to appear?

Does this happen in other scripts where the date picker should appear? Try GLJournal.php for instance.


What browser are you using?

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
02-04-2020, 11:14 PM
Post: #6
RE: Unknown Date Format
It looks like I only cleared the cache for the previous hour. I cleared all the cash and history and now I do not get the unknown date format error any more. And the date picker shows up. However, nothing shows up in the history of stock movements.

I did a little more investigating and tried different versions of the script. All of them work except the latest one in Git. The commit on Nov 9, 2018 works, but the commit on April 2019 is not working for me. The dates work, but nothing nothing shows in the history of the part.
Find all posts by this user
Quote this message in a reply
02-05-2020, 01:02 AM
Post: #7
RE: Unknown Date Format
Are the parts controlled items?

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
02-05-2020, 02:11 AM
Post: #8
RE: Unknown Date Format
The parts are not controlled items. There was an error in the database upgrade on the custbranch table. the lat and ing have a type of float(10,6) and the upgrade tried to change it to float(12,8). It was unable to do this and when I tried to do it in phpmyadmin, it gave the same error of:
Cannot drop index 'DebtorNo' needed in a foreign key restraint.

Not sure if that has anything to do with it?
Find all posts by this user
Quote this message in a reply
02-05-2020, 08:30 AM
Post: #9
RE: Unknown Date Format
I am thinking it has something to do with the custbranch table, though I can't see why it would be that error. The April 2019 commit was basically to link the stockmoves table with the custbranch table. I am not sure when the release was done, but if this commit was done after the release can you try doing the change to your script:
https://github.com/timschofield/webERP-s...fa30565408
It is a one line change from an inner join to a left join.

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
02-05-2020, 09:38 AM
Post: #10
RE: Unknown Date Format
That seems to have fixed the problem. It is working now.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)