• Resolved accardof

    (@accardof)


    Good morning,
    We have noticed that (hypothetically) since April 1 the logic has changed. In fact, we noticed that a new “calculated_number” column has appeared in the “wp_wcpdf_invoice_number” table since April 1st. Until that day the value of the new column is null. Reading the code we saw that there is a logic that takes the id of the last invoice sent and increases by 1 if the previous row has the column “calculated_number” is null. This behavior implies a jump in the numbering of the invoices and creates malfunctions in our billing system. Another thing we noticed is that invoices with “calculated_number” null are not displayed in the search for orders after April 1st.

    Furthermore, is this behavior wanted or is it a problem to be solved?

    I anticipate that the versions of plugins used are:
    WooCommerce PDF Invoices & Packing Slips is 2.2.6
    WooCommerce PDF Invoices & Packing Slips PRO is 2.2.11.

    As we find it difficult to update both plugins for bureaucratic reasons, do you confirm that if we update both plugins or only one of them the problem is solved?

    Thanks for your attention.
    Greetings.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hello,
    The calculated number is a setting that you can find on the “Status” tab of the PDF Invoice settings. It’s a fallback mechanism for servers that have alternative database settings (normally the numbers are automatically generated by the AUTOINCREMENT option the DB table rather than calculated because this is more reliable). The numbers you find in this table are not used by the orders/invoices themselves, the table merely serves as an aid for generating the numbers and a log. When you delete the table, the numbers in existing invoices are not affected, and if you reset the invoice number in the settings (Documents > Invoice > Next number) the table is also cleared except for 1 (newly created) row that serves as a reference.

    I do recommend to update all plugins to the latest version but there are no known issues with invoice number system.

    Did something change on your server on April 1st, or did someone enable the “Calculate document numbers” feature?

    Thread Starter accardof

    (@accardof)

    Hello Ewout,
    we’re still analysing our DB and we’ve found out that the jump of “calculated_number” corresponds where there is a switch from an invoice to a credit_note.

    Can you explain this? Is this wanted or maybe there’s some mechanism behind this behavior?

    Thanks for your support!

    Plugin Contributor Ewout

    (@pomegranate)

    I see, that certainly explains. Credit Notes can be set to use the main invoice numbering, you can find this setting under WooCommerce > PDF Invoices > Documents > Credit Note > Number sequence.
    Make sure that the Professional extension is up to date (2.2.14)
    www.ads-software.com does not allow us to handle support for our paid extension via these forums, so if you need more help with this, please send an email to [email protected] (be sure to include your license key order order number too).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Skip numbering invoices’ is closed to new replies.