Forum Replies Created
-
AuthorPosts
-
RRowley
ParticipantNot sure what is going on. There are a few things I’d like you to update to the latest SI version and check again. Likely won’t change anything but then we are working from common code. Let me know either way. If the problem still occurs, I’ll put together some changes to display data to try and drill into what is going on.
RRowley
ParticipantThe most likely case is that the si_invoices owing field has been zeroed out. You can set this field to 1 in records to force SI to recalculate the owing field for display purposes. It will also allow you to do payments from the invoice manage screen.
This slows down processing as the owing value is recalculated for all invoices; paid off or not. If you enter the edit screen for invoices with payments due and save them without making changes, the owing field will be properly set. If you does this for all invoices that are outstanding, you can then change all those with an owing value of 1 back to 0 so they no longer force the recalculation.
You can use phpMyAdmin to set the owing field to 1:
UPDATE si_invoices SET owing= 1 WHERE 1
Later you can use phpMyAdmin to set the owing fields with a value of 1 back to 0:
UPDATE si_invoices SET owing= 0 WHERE owing = 1
RRowley
ParticipantYou need to restore your database to what it was before you loaded the master_2020 update. Hopefully you exported the 2019.2 database and have the sql file to do the restore. You can drop all the tables in the database, then import the sql file of your 2019.2 database.
Next in the file, include/init.php, find the line (about line #61):
$databasePopulated = $patchCount > SqlPatchManager::BEGINNING_PATCH_NUMBER;
and change it to:
$databasePopulated = $patchCount >= SqlPatchManager::BEGINNING_PATCH_NUMBER;
Now access your database again and it should let you apply the patches for 2020 and go forward from there.
RRowley
ParticipantNeed to check if you have a database table named si_products_values. The error says you don’t. Now check if you have a table named si_products_attributes_values.
If you don’t have either table, create the si_products_values table and try SI again.
If you have the si_products_attributes_values table then insert the following to the si_sql_patchmanager table:
FIELD NAME VALUE sql_patch_ref 324 sql_patch Rename si_products_values table to si_products_attributes_values sql_release 20210527 sql_statement ALTER TABLE si_products_values RENAME TO si_products_attributes_values; source fearless359
Adding this to the patch table will tell SI that this patch has been applied.
Let me know what you find and how this works out.
-
This reply was modified 2 years, 5 months ago by
RRowley.
RRowley
ParticipantAre you saying that you replicated this problem with the current master_2020 version of SI?
If so, can you please give me detailed steps so I can replicate and fix?
RRowley
ParticipantIt would be interesting to see the “quick view” for this invoice. This shows the detail and the amount paid on it. If you can include a picture with Customer and Biller redacted. Also, if you could display the data base records for the invoice. These are in the tables: SI_INVOICES, SI_INVOICE_ITEMS, SI_INVOICE_ITEM_TAX and SI_PAYMENTS.
In SimpleInvoices, not the invoice number you want to get records for. Use this value to Search the si_invoices table via the index_id field.
Get the si_invoices record. Note the id value. Use the id of the invoice to select si_invoice_items via the index_id.
Use the si_invoice_items id value to get si_invoice_item_tax records via the invoice_item_id field.
Use the si_invoices id value to get si_payment record via the ac_inv_id field.
If you are using phpMyAdmin, select the table you want to get records from and then us the Search menu to do your selection.
If you screen show each selection and show it here, we’ll see what the offending record is.
-
This reply was modified 2 years, 6 months ago by
RRowley.
RRowley
ParticipantAlso note that once the precision is set, you can access the invoice in EDIT mode and save it to cause the OWING field to be updated. This should hopefully correct that decimal setting.
RRowley
ParticipantWhat is the localPrecision set to in the config/custom.config.ini file? If this is set to 2, the numeric amount values should be trimmed to 2 decimal places.
RRowley
ParticipantI suspect the issue is with attempt to render the two amount fields where data is bad. One thing to try is to print the fields without rendering. This isn’t too difficult. Make a copy of the file “templates/default/invoices/manage.tpl”. Now change the original file from:
{ "data": "total", "render": function (data, type, row) { let formatter = new Intl.NumberFormat(row['locale'], { 'style': 'currency', 'currency': row['currency_code'] }); return formatter.format(data); } }, { "data": "owing", "render": function (data, type, row) { let formatter = new Intl.NumberFormat(row['locale'], { 'style': 'currency', 'currency': row['currency_code'] }); return formatter.format(data); } },
to:
{"data": "total"}, {"data": "owing"},
Now try it an see what the data looks like. Look for any oddities in these two fields. You might have to page past the first screen.
-
This reply was modified 2 years, 6 months ago by
RRowley.
August 1, 2022 at 5:56 am in reply to: Something went wrong, please try saving the invoice again #1780RRowley
ParticipantThis is actually the 2019.2 update and this stop is not unexpected. The issue is likely an orphaned record in the database that prevents the foreign key update from applying. You need to look at the error information in the tmp/logs/php.log file. It details what record(s) are at issue. If you want to display that information here or zip and attach the log file, I will look at it and let you know what can be done.
You can also look at the “Unable to set Foreign Keys Error Handling” topic in the “Version Update Process” menu option on the left.
NOTE: The php.log file might contain secure information. Be sure to scrub it before attaching/publishing it.
-
This reply was modified 2 years, 6 months ago by
RRowley.
July 29, 2022 at 7:09 am in reply to: Something went wrong, please try saving the invoice again #1777RRowley
ParticipantSorry that you feel you need to move on. Do you recall the SqlPatchManager error you encountered? And have you tried to update recently?
July 28, 2022 at 10:47 am in reply to: Something went wrong, please try saving the invoice again #1773RRowley
ParticipantIt appears you running SI version master_2019.2. Is there any reason you can’t updated to master_2020?
July 26, 2022 at 3:06 am in reply to: Something went wrong, please try saving the invoice again #1768RRowley
ParticipantFirst, check the web server (Apache?) log files to see is anything is reported there. Next check the PHP error log file. The next step would be to set the SI logger lever to DEBUG (custom.config.ini loggerLevel = DEBUG). Recreate the error and look at the tmp/log/si.log file and see where it ends. That is where the process stopped. Hopefully that guides you to the problem.
I did check out the mysql 8 vs mariadb which I use and they are SQL compatible. So I don’t suspect an issue there.
RRowley
ParticipantUnfortunately making an extension requires PHP and Smarty knowledge. Details on setting an extension up can be found in the Extensions topic in the menu list on the left.
RRowley
ParticipantThe problem is the PDF logic on a localhost server cannot handle an absolute URL path to the icon image. It does work with a relative path.
I just update the files on github to change the logo path to a relative path on all export template. This is version 2020.3.20. If you have your own template, you can remove the holiday_logo function from it as the logo value passed to the template is correctly modified and any holiday logo resolved before it is passed to the template.
The holiday_logo function in the template still exists but does not change anything. It will generate an entry in the error_log file indicating that the template should be updated. This is done so that your template will process correctly even with this function still in it.
-
This reply was modified 2 years, 5 months ago by
-
AuthorPosts
Recent Comments