SimpleInvoices Group Forum › Forums › Fearless359 SimpleInvoices Discussion Group › Invoices not appearing in grid
Tagged: invoice list, localPrecision, owing
- This topic has 12 replies, 3 voices, and was last updated 2 years, 3 months ago by RRowley.
-
AuthorPosts
-
July 5, 2022 at 4:56 am #1695atd80dParticipant
I have updated to Version: 2020.3.19 — 20220420 and cannot see any errors being reported.
The reports e.g. index.php?module=reports&view=reportStatement
show valid invoices in the database.However the main invoice list:
/index.php?module=invoices&view=manageJust says loading and Showing 0 to 0 of 0 entries
I have tried the instructions given in the Common problems, but still cannot see any invoices in the grid.
I have noticed a data.json file being created the public folder that looks like the html for the report.
Any help will be very much appreciated as this is such a useful application.
July 5, 2022 at 9:22 am #1696RRowleyParticipantTurn on tracing to see if there are any places that processing stops. Do this by setting these values in the confgi/custom.config.ini file:
debugLevel = All
debugErrorReporting = E_ERRORThis will report information in the tmp/log/si.log file.
Note that secure information is reported in this file, so make sure any is obscured if you show this info in this forum.
Normally, when the unresolved loading happens, something is wrong with the data table information. Do make sure that you have the both the gdt and the intl extensions enabled in your php.ini file. You can verify this via the SI phpinfo.php file. To use this, modify the $secure setting to false. Then access this file by specifying /phpinfo.php after the SI https entry.
July 8, 2022 at 6:06 pm #1702FreakWentParticipantCheck your language settings on the system defaults and the invoice setup. I had the same problem after an update, that fixed it.
August 7, 2022 at 7:34 am #1782atd80dParticipantThank you for your help with this.
(1) Language Settings
I have checked language settings on both system defaults and the default invoice and these look correct.(2) intl and “gdt” extensions.
I can see an intl extension, but not a gdt – perhaps this was a typo?——————-
intl
Internationalization support enabled
ICU version 63.1
ICU Data version 63.1
ICU Unicode version 11.0
——————–
gd
GD Support enabled
GD headers Version 2.2.5
GD library Version 2.2.5
———————(3) Setting the following:
; Production site configuration data
[production]
debugLevel = All
debugErrorReporting = E_ERRORDoesn’t add anything to tmp/log/si.log
Are there any other things I should check.
p.s. I should point out the reporting is working, e.g. total sales and Debtors by amount owed etc. So the database entries for the existing invoices seem to be being accessed correctly.
Only the Invoices summary grid in “Filter: All” shows “Loading…” and no entries.
With the list set to “Show All Entries” I get:
Showing 0 to 0 of 0 entriesWith the list set to All
The Due category does show an entry.
Please see set of screenshots attached which might help.Attachments:
August 9, 2022 at 2:30 am #1784RRowleyParticipantI 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, 4 months ago by RRowley.
August 16, 2022 at 3:44 am #1786atd80dParticipantThanks again for your support with this.
Table now fills with all invoices.
It looks like there is a rounding error from a part payment of an invoice resulting in an balance and causing an overflow of decimal places?
Attachments:
August 16, 2022 at 4:51 am #1788atd80dParticipantBit more info… In the data field the amount owing is stored to 6 decimal places, so non-zero decimals after that are spurious i.e. the 3 [20.450000000000003]
Attachments:
August 16, 2022 at 11:25 am #1790RRowleyParticipantWhat 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.
August 16, 2022 at 12:59 pm #1791RRowleyParticipantAlso 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.
August 19, 2022 at 4:20 am #1792atd80dParticipantLooking back at all the saved versions the localPrecision in config/custom.config.ini (and config/custom.config.php) has always been set to 2.
localLocale = en_UK
localCurrencyCode = GBP
localPrecision = 2I tried opening the invoice and saving it and those decimals are still there. Bit of a strange one this! I guess part payment of invoices is a bit of an unusual situation…
- This reply was modified 2 years, 4 months ago by atd80d.
August 19, 2022 at 9:02 am #1794RRowleyParticipantIt 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, 4 months ago by RRowley.
August 31, 2022 at 11:10 am #1796atd80dParticipantSorry – I cleared the error by writing off the small balance owing on that invoice. Hence the problem has gone away.
One thing I have noticed in the past with the 2011 version is I had a problem with small rounding errors when filling in the invoice amount in the amount paid rather than just accepting the pre-populated field and processing the payment (on invoices paid in full). It was a if the prepopulated field had some hidden decimals that were taken care of with a full payment.So on this with the problematic invoice I entered the part payment and a similar problem occurred.
September 1, 2022 at 2:32 am #1797RRowleyParticipantAre 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?
-
AuthorPosts
- You must be logged in to reply to this topic.
Recent Comments