Forum Replies Created
July 13, 2020 at 2:41 am in reply to: price needs to be normalized when creating itemized invoice #940
What worked for me is what I wrote above (post #871) is to edit the file located at /modules/invoices/save.php
On line 71 (in my version),
(see enclosed image)July 8, 2020 at 11:11 pm in reply to: price needs to be normalized when creating itemized invoice #937
I’m glad someone else beside me has the same symptom!
I still believe that the posted price string needs to be normalized with SiLocal::dbStd($_POST[“unit_price$i”]) for processing amounts with 4 or more digits.
p.s.: I solved the currency error (it was due to an invoice preference using the € symbol instead of EUR.
Opening the invoice list is indeed much faster than before: it now takes 8 seconds.
Creating a new invoice still takes nearly 40 seconds.
But even with the latest version of master_2019.2 in a clean install, the comma used as a thousands separator in the amount still gets passed on to the database insert query and causes the same error.
Hello, and excuse the late answer (I had forgotten to tick the “Notify” box for this post, so I didn’t realize that you had responded).
It seems a little faster, but I’ll have to try on the unix server, because in MAMP no invoices show in the list (opening the list pauses for several seconds, but none are displayed).
I can create a new invoice, and all the customers and products show, but that part is still very slow which is inevitable if they all have to load into the selects.
I’ll try to test this on the unix server over the weekend.May 19, 2020 at 2:01 am in reply to: three sql errors when upgrading from 2013.1.beta.8 #879
One more patch that would be needed when upgrading older si databases is to add the password constraints to the si_system_defaults table:
Otherwise the validation pattern in the user edit form doesn’t accept any password changes.
Enclosed is the patch update display that showed when first opening the old database with Master_2019.2
After applying them all, the password constraints were still missing in the si_system_defaults table.May 18, 2020 at 4:52 am in reply to: price needs to be normalized when creating itemized invoice #876
It may depend on the localization settings? This site is set to British English, so numbers display with a comma as thousands separator (see enclosed screenshot), and apparently this is passed on in the POST arguments because the sql error was complaining that this was being used in the insert command.
In your code the “edit” function already did use SiLocal::dbStd to filter that out, so it would seem logical that the insert should, too, no?
Enclosed also the phpinfo: this is a dedicated Linux server running Ubuntu 18.04May 17, 2020 at 8:44 am in reply to: price needs to be normalized when creating itemized invoice #871
p.s.: Searching the files listed in the error log, it looks like the patch would be on in /modules/invoices/save.php
the “insert” case on line 71, one should use SiLocal::dbStd($_POST[“unit_price$i”]) instead of the unmodified $_POST[“unit_price$i”] (as the “edit” case does)
- This reply was modified 6 months, 1 week ago by joncas.