Jump to content

Grant extra days to certain customers based on domain


dimitrifrom31

Recommended Posts

Hi,

 

As you may know there was a fire in an OVH datacenter. Due to this I have several machines down and thus several customers without service at the moment.

I would like to add extra days to these customers (first to compensate the down time and later again as a gift for the issue).

I ma hosting game servers and Im using the whmcs "domain" field to identify their game servers by ip and port.

So I was thinking of a mysql query such as:

UPDATE `tblhosting`
SET `nextduedate` = DATE_ADD(`nextduedate` , INTERVAL 30 DAY)
WHERE `domain` LIKE '%123.123.123.123%' OR `domain` LIKE '%456.456.456.456%' ;

 

Now my concerns:

- this will post pone next due date but if the customers have an existing unpaid invoice I assume this will generate another invoice on next daily cron job and thus charge them twice for the service instead of adding free days. Should I update all the invoices for these customers to mark them as cancelled ?

- I see there is also a 'nextinvoicedate' column in the 'tblhosting' table. Should I also update the nextinvoicedate or is that done automatically when updating nextduedate ?

 

 

thank you

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