Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

WHMCS auto delete overdue invoices hook

Does anyone have or can anyone write a WHMCS hook to auto delete overdue invoices older than 100 days in WHMCS? I'd like to run the hook as a daily cron job. Thank you!

Comments

  • PM me.

  • BharatBBharatB Member, Patron Provider

    I can , is it paid or do you need the code written free ?

  • So how many overdue invoices do you have?It seems like a manual job of 2-3 minutes you need to do every month or something.

  • This is a sample hook:

     <?php
     
     function hook_create_forum_account($vars) {
     
         $firstname = $vars['firstname'];
         $lastname = $vars['lastname'];
         $email = $vars['email'];
     
         # Run code to create remote forum account here...
     
     }
     
     add_hook("ClientAdd",1,"hook_create_forum_account");
     
     ?>
    

    That's all it is, and I don't need it that much so I'm not going to pay anything for it. I just wanted to know if the community already had something or had enough experience to write a hook out. I have a couple hundred invoices, and it would be nice to not have to go in there and do it myself.

  • LeonardCLeonardC Member
    edited December 2014
    UPDATE `tblinvoices` SET `status` = 'Cancelled' WHERE `duedate` <= DATE_SUB(CURDATE(), INTERVAL 100 DAY) AND `status` = 'Unpaid'</pre>
    
  • dccdcc Member, Host Rep
  • MetroVPS_NMPMetroVPS_NMP Host Rep, Veteran

    Sent PM @PetaByet

Sign In or Register to comment.