Invoices not appearing in grid

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1695
    atd80d
    Participant

    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=manage

    Just 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.

    #1696
    RRowley
    Participant

    Turn 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_ERROR

    This 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.

    #1702
    FreakWent
    Participant

    Check your language settings on the system defaults and the invoice setup. I had the same problem after an update, that fixed it.

    #1782
    atd80d
    Participant

    Thank 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_ERROR

    Doesn’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 entries

    With the list set to All

    The Due category does show an entry.
    Please see set of screenshots attached which might help.

    Attachments:
    #1784
    RRowley
    Participant

    I 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.
    #1786
    atd80d
    Participant

    Thanks 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:
    #1788
    atd80d
    Participant

    Bit 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:
    #1790
    RRowley
    Participant

    What 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.

    #1791
    RRowley
    Participant

    Also 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.

    #1792
    atd80d
    Participant

    Looking 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 = 2

    I 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.
    #1794
    RRowley
    Participant

    It 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.
    #1796
    atd80d
    Participant

    Sorry – 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.

    #1797
    RRowley
    Participant

    Are 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?

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.