DavidJ Posted May 1, 2013 Share Posted May 1, 2013 We're using 5.2.3, though had this problem with earlier versions as well. It seems WHMCS uses the domain due date and generates invoices based on that date, however, given domain sync runs each night -- that changes. It seems that WHMCS is randomly generating invoices in duplicate for some of these domains that have their dates adjusted. Any thoughts? Has anyone seen this prior, and, is the only solution to disable domain sync? 0 Quote Link to comment Share on other sites More sharing options...
And then there was one les Posted May 4, 2013 Share Posted May 4, 2013 The problem isnt whmcs, the problem is the sync dates. If the domain had a date today then an invoice would be generated today, and then if the sync runs after it the date changes to tomorrows date, then whmcs will create another invoice tomorrow. The solution is to run the sync of domains regularly whmcs recommend every 4 hours, this should eliminate the problem, but if you prefer to run it only once a day then make sure you run it before the whmcs cron and allow it sufficient time to complete, this could be quite a long time with a lot of domains. IF however you mean that it is generating two invoices at the same cron run, then this is a bug as you have suggested. 0 Quote Link to comment Share on other sites More sharing options...
And then there was one les Posted May 5, 2013 Share Posted May 5, 2013 It seems WHMCS uses the domain due date and generates invoices based on that date You are correct, the domain expiry date is used to generate invoices, you can also set that the invoice is due x days before the due date, this is a good option as it allows you to manually set a domain name to cancel for those registrars that automatically bill all domain names registered, there are some that do even to resellers. I use one of them myself so have applied the setting myself. When i first started selling domain names that was a problem and a couple of times i missed the cancellation/renewal date, i was then charged for the domain names which were no longer required by the client. Those costs were obviously my responsibility. These things happen. 0 Quote Link to comment Share on other sites More sharing options...
alinford Posted May 6, 2013 Share Posted May 6, 2013 The solution is to run the sync of domains regularly whmcs recommend every 4 hours, this should eliminate the problem, but if you prefer to run it only once a day then make sure you run it before the whmcs cron and allow it sufficient time to complete, this could be quite a long time with a lot of domains. This does not solve the problem if you have a large number of domains in the system. If we ran a sync one every 4 hours, it would take 2 weeks to sync all of our domains. We run it every 5 minutes, and it still takes several days to get through the whole system. This may not be a bug because it is acting as designed, but the design is certainly flawed. 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted May 7, 2013 Share Posted May 7, 2013 The bigger question is why you need to sync at all - why are the dates on your domains incorrect ? 0 Quote Link to comment Share on other sites More sharing options...
And then there was one les Posted May 8, 2013 Share Posted May 8, 2013 (edited) That is actually a very good point othellotech, the sync should only check recently managed domains. I think in this way the job would run much more efficiently. A better option would be to place all recent domains into a table when they are managed ready to be synced, so a registration, transfer or renewal would be managed at the very next sync and all other domains would not need to be touched. The reason domains do need syncing is the way in which transfers work, whmcs doesnt know the expirey date also consider, some registrars for a renewal on transfer no matter when its transfered and other may allow a transfer for free as long as there is x amount of time. Each module should have its own sync process inbuilt i guess at least then it can be done just once per domain. Edited May 8, 2013 by CDJ Hosting 0 Quote Link to comment Share on other sites More sharing options...
And then there was one les Posted May 8, 2013 Share Posted May 8, 2013 If we ran a sync one every 4 hours, it would take 2 weeks to sync all of our domains. We run it every 5 minutes Do you not have any complaints from the registrar doing this? what with constantly synchronising domains that were already synchronised 5 minutes ago? 0 Quote Link to comment Share on other sites More sharing options...
DavidJ Posted May 9, 2013 Author Share Posted May 9, 2013 The bigger question is why you need to sync at all - why are the dates on your domains incorrect ? That's probably a better question for WHMCS -- there's no legitimate reason that I can see for the dates to be out of sync. Nonetheless I'll set things to sync every four hours. Bandaids are fun 0 Quote Link to comment Share on other sites More sharing options...
DavidJ Posted May 9, 2013 Author Share Posted May 9, 2013 (edited) There we go, have ran the script ~95 times and finally have a relatively in sync database. If enomsync.php would use local database knowledge (sync items that lack an expiry date first) - instead of doing it haphazardly -- it'd likely take far less syncs Edited May 9, 2013 by DavidJ 0 Quote Link to comment Share on other sites More sharing options...
DavidJ Posted May 9, 2013 Author Share Posted May 9, 2013 The bigger question is why you need to sync at all - why are the dates on your domains incorrect ? Manual orders, transfers and other random items I imagine -- at once a day syncing it'd take us ~one year to run a full sync if it were executing once every 24 hours (which it was). More often should resolve it. It'd be handy if enomsync only outputted changes & domains that aren't found, vs. outputting a list of ~50+ domains each email 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.