perlancar Posted December 18, 2018 Share Posted December 18, 2018 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? 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted December 20, 2018 Share Posted December 20, 2018 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 :( 0 Quote Link to comment Share on other sites More sharing options...
perlancar Posted December 20, 2018 Author Share Posted December 20, 2018 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. 0 Quote Link to comment Share on other sites More sharing options...
RogerNelson59658 Posted January 22, 2019 Share Posted January 22, 2019 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. 0 Quote Link to comment Share on other sites More sharing options...
perlancar Posted January 23, 2019 Author Share Posted January 23, 2019 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. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.