• Resolved Julien Vandermeersch

    (@jvkonfi)


    Hello,

    I’m having an issue with an order getting two invoice numbers, thus skipping one invoice.

    03/29 : One order was placed with invoice number 1121
    03/29 : One order was place with invoice number 1123

    So it seems that invoice number 1122 was skipped, but when inspecting the database, it does exist for the same order that generated invoice number 1121…

    Our client can’t have holes in their invoice numbers, what can be done to rectify that? Can I set the next order to be 1122 and then go back on track?

    I already tried the Number Tools plugin, but that did not go as expected…

    Thanks a lot for the help.

    EDIT : it seems like it’s the case for another invoice that’s missing… What could be doing this?

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @jvkonfi,

    Could you please tell me which option you have selected under?WooCommerce > PDF Invoices > Documents > Invoice > Display invoice number?

    If is?Order number, our recommendation is to change it to?Invoice number. Since in most European countries there’s a hard requirement for invoice numbers to be sequential without any gaps, to use the invoice numbers in the sequence (keep them separated) is the best option.

    If you use the order number as invoice number there may be gaps, since the orders are numbered in the main WordPress post numbering system used by posts, pages, images, orders, coupons, products, etc.

    So if you create a new product between when two orders are placed, and upload an image for that product too, the order number is not sequential (if the first order was?#100, the product would be?#101, the image?#102?and the next order?#103).

    See?Invoice numbers explained.

    Thread Starter Julien Vandermeersch

    (@jvkonfi)

    Hi Yoan,

    We do not use order number to display the invoice numbers.

    The option selected under “Display invoice number” is “Invoice number”.

    There hasn’t been any issue until one invoice number got “skipped”, like I said, there seems to have been two invoices created for the same order. Technically there is no gap since the invoice exists in the database but it is blank and impossible to retrieve (if I want to export all order invoices, this one does not export).

    This is a problem since we generate an export with all orders in a CSV file and can’t have gaps in the invoice numbers.

    What can we do to fix that? I don’t know what to do at this point…

    Thanks,
    Julien

    Thread Starter Julien Vandermeersch

    (@jvkonfi)

    I have screenshotted the invoice numbers table and highlighted the two rows that have the same order id:

    Thread Starter Julien Vandermeersch

    (@jvkonfi)

    Can we get any help regarding this issue?

    I need to provide my client with a solution and preferably fast.

    Thanks,
    Julien

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @jvkonfi,

    Thanks for sharing that screenshot. This makes me think that this could be caused by PayPal. Do you use PayPal in your store?

    There is a known WooCommerce issue with a specific PayPal configuration, and it affects more than just invoice creation. PayPal has two different methods for confirming payment of an order (name “PDT” and “IPN”). If you have enabled both of them, PayPal sends two notifications to WooCommerce at the same time. This results in what is called a “race condition”: the processes start in parallel (not being able to see the other yet), doing the same tasks. The client receives two emails for their order (each with an invoice), stock gets reduced twice, and other processes might be duplicated as well. Because an order can only have one invoice, only one of them ‘survives’ after the processes have finished.

    IPN and PDT serve the exact same purpose, so you only need one of them. Two options (choose one):

    1. To disable PDT, clear the “PayPal identity token” in the PayPal gateway settings in WooCommerce.
    2. To disable IPN you will need to go to your PayPal merchant backend (where you can also disable PDT by the way).

    Let us know if this indeed solves your issue!

    Thread Starter Julien Vandermeersch

    (@jvkonfi)

    Thanks for the answer Yoan,

    We do not use PayPal, we use PayPlug as our payment method. There does not seem to be any settings like PayPal.

    What can we do to fill the gap that we got in the invoice numbers?
    Is there a way to remove the blank invoice from the database and regenerate the invoice numbers starting from the gap?

    Thread Starter Julien Vandermeersch

    (@jvkonfi)

    We still have not been able to resolve that issue.

    Is there any help you can provide us?

    Hi Plugin Contributors,

    Thank you for your amazing Plugin.

    Even I am facing the same issue, Its happening from last month, It worked well before that.

    For one woo-commerce order there are two pdfs emailed with different invoice numbers to my customers. I changed the payment gateways to check but the result is same. I request you to help me solve this issue at the earliest.

    Thanks

    Vimal

    Plugin Contributor Yordan Soares

    (@yordansoares)

    @jvkonfi, I asked about your case to one of our more experienced developer, so he can take a look and try to understand what could be happening. I will post a new reply as soon as I receive an answer from him.

    @vimal07, could you please tell me which payment method(s) are you using in your store?

    Thread Starter Julien Vandermeersch

    (@jvkonfi)

    @yordansoares

    Any news on that matter?

    I can provide accesses if there is need to.

    @yordansoares

    I’ll create a new thread. So there is no confusion in the topics.

    Thanks

    Vimal.

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @jvkonfi,

    We believe that this is definitely a race condition produced by the payment method you are using. However, we will be investigating this behavior this week, to check if we can do something from our side to avoid this issue.

    I will reply again, as soon as I have news about it.

    Thanks for your patience.

    Thread Starter Julien Vandermeersch

    (@jvkonfi)

    Can you provide any news on that matter?

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @jvkonfi,

    Sorry for not to reply sooner. We are still working on it. I have opened a GitHub issue for this, that you can follow, here.

    I would like to clarify that this is not an issue produced by our plugin, but for third-party products. However, the issue mentioned above, will add an extra check to try to avoid these issues produced by them.

    Thread Starter Julien Vandermeersch

    (@jvkonfi)

    Thank you Yoan, we shall look forward to any reply on your end.

    I get that it’s probably caused by ohter third party plugins but I feel that it should check if the order number already has an invoice generated so that another one does not get generated by mistake.

    Thanks again,
    Julien

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Invoice number skipped’ is closed to new replies.