• Resolved Grafikx

    (@grafikx)


    Hi !

    When generating invoices one by one, the invoice numbers follow one another. No problem.

    But if we use “Group action” to create the PDF integrating several order invoices, the numbers of these invoices are not consecutive. The numbers skip 2 to 2. Example: 101 – 103 – 105 etc

    Is there a trick in the settings?

    (WordPress 5.7 + WooCommerce 5.1.0 + PDF Invoices 2.8.2)

    Thank you in advance for your help !

    • This topic was modified 5 years, 2 months ago by Grafikx.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hello @grafikx,

    What option do you have under WooCommerce > PDF Invoices > Documents > Display invoice number? If is Order Number, consider to change it to Invoice Number in order to prevent this behavior.

    Please read Invoice numbers explained to learn more.

    Hope it helps!

    Thread Starter Grafikx

    (@grafikx)

    Hi ! @yordansoares

    I have checked and its already configured like this, with “Invoice number”.

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Hello @grafikx,

    This is an odd behavior.

    However, you can use the Number tools to see the invoice logs.

    Please follow the steps below to do so:

    1. Download, install and active the last release of Number tools.
    2. Now go to WooCommerce > PDF Invoices > Number tools > Document Numbers, select Invoice en click on View button.
    3. Now you will be able to track the invoice number sequence by date and order number.

    Let me know if you figure out what was happening!

    Thread Starter Grafikx

    (@grafikx)

    Hi @yordansoares !

    I followed your tutorial and I obtain a table with 33 elements only with the 33 elements which follow one another correctly but the last element of the table is indicated without order number and with order status “Unknow”.

    Do you think that the bug therefore comes from this invoice number which is linked to nothing … or to a deleted order or other ?

    I will see if I can reassign this invoice number and if that fixes the problem.

    EDIT : Finally no, the last number marked as “unknown” is however well attached to an order with a good number when I check on WooCommerce orders.

    • This reply was modified 5 years, 2 months ago by Grafikx.
    Thread Starter Grafikx

    (@grafikx)

    Hi @yordansoares !

    I am coming back to you because I was finally able to see the bug. In fact, with your plugin I could see that regularly 2 invoice numbers are assigned to the same order.
    I have attached a screenshot with the bug on the last orders in progress.

    https://ibb.co/1Gx33ZZ

    Do you have a solution to solve this problem ?

    Plugin Contributor kluver

    (@kluver)

    Hi @grafikx,

    It looks like you’re dealing with a so called ‘race condition’ from time to time. This happens when the same process is triggered twice at exactly the same time. Because these two processes are doing the same thing in parallel, neither knows there is already an invoice number created. Resulting in two numbers for the same order.

    Are the orders with double invoice numbers perhaps payed via PayPal? We have had some more issues with this in the past. See the following ticket: https://wordpress.org/support/topic/bug-skipped-invoice-numbers/#post-10436537

    • This reply was modified 5 years, 2 months ago by kluver.
    Thread Starter Grafikx

    (@grafikx)

    Hi @kluver !

    No Unfortunately. Orders that have a double invoice number have been paid by credit card with E-Transactions.
    So PayPal is not concerned.

    Another possible solution ? 🙂

    Thank you in advance for your help !

    Plugin Author WP Overnight

    (@wpovernight)

    It seems that something happened to all these orders at the same time: 2021-04-09 08:18:17.
    Could you tell us exactly, step by step, what happened at that time? Did you change the status of the order in bulk? Creating the PDF in bulk (via the “Bulk actions” dropdown which I assume you are referring to as “Group action” earlier, is that correct?) wouldn’t cause duplicates because it’s a serial process, so there must be another process triggering concurrent generation of the documents. Is there a third party application linked to WooCommerce via the API that performs bulk actions? Or are you using another bulk action?
    Are you using any custom code that would request the invoice number somewhere else (for example inside the email text or subject?) Or are you changing the order status programmatically?

    Thread Starter Grafikx

    (@grafikx)

    Hi @wpovernight !

    1. Yes, we just created the PDF in bulk (via the “Bulk actions” dropdown).
    2. No, we dont use another bulk action, no custom code, no changed the order status programmatically (to my knowledge).

    In addition, we have a staging version of the site.
    On the staging version, no worries. We only have this problem on the Prod version. And the only difference between the two is the “Iziflux” plugin.
    I’ll do some testing by disabling this plugin and maybe others if that doesn’t fix the problem.

    If you have another solution in mind, I’m interested!

    Thank you again for your help !`

    Thread Starter Grafikx

    (@grafikx)

    Hi !

    I am coming back to you after having tested several things.
    I tested by disabling all plugins, changing theme, disabling API, custom scripts… nothing changed.
    Eventually, I noticed that this only happened with “Shop manager” accounts. But with other types of accounts like “Administrator” for example, no worries. So, to solve the “problem”, we just have to modify the statuses of the accounts concerned. xD

    Cya !

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Group action: Invoice numbers do not follow each other’ is closed to new replies.