Jump to content

Duplicate paid invoice number (another topic)


perlancar

Recommended Posts

Since this thread is closed: https://whmcs.community/topic/284653-clashing-paid-invoice-numbers/

I'm opening another thread. It seems that as of 7.6.1, WHMCS still does not create a unique index on tblinvoices(invoicenum). This makes it possible for duplicate invoice numbers to be created from time to time due to race condition. I'm contemplating adding the unique index for now. What do you guys think?

 

Link to comment
Share on other sites

You should detect duplicate invoice numbers as soon as they occur (doable) and fix numbers on the fly before sending any notification to customers.

The first part is easy but dealing with the second one is one of the most frustrating thing of WHMCS. In fact a proforma can turn into an invoice in tens of ways. You need to use 3 hook points (invoice creation, invoice paid, invoice paid pre email) simultaneously avoiding making changes twice. It's a mess :(

Link to comment
Share on other sites

What I want to do is to avoid duplicates getting created in the first place, obviously 🙂

BTW, I've also asked another WHMCS user that use pro-forma invoicing, but they do not seem to be having duplicates problem at all, so I'm a bit confused. Technically, duplicates can happen due to the lack of unique index in the database.

Link to comment
Share on other sites

  • 1 month later...
18 hours ago, RogerNelson59658 said:

If you want to avoid duplicates file you should use duplicate files deleter. It helps to find duplicate files, photos, documents, MP3s, videos, and more.

How do you think such program will help in this case? We're not talking about "files" here.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated