Jump to content

Bug: Domain sync results in duplicate domain invoices


Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by CDJ Hosting
Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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 by DavidJ
Link to comment
Share on other sites

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 :)

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