Read only
Every query below is a SELECT. It changes nothing. Run it in phpMyAdmin or the mysql client, on a copy of the database if you have one.
WHMCS guide
WHMCS suspends by the next due date on the service, not by the invoice. When a payment closes the invoice without moving that date, the daily cron suspends a client who paid. When the open invoice is gone, a suspended client has nothing to pay to get back online.
DMS.S2 — Before you start
Every query below is a SELECT. It changes nothing. Run it in phpMyAdmin or the mysql client, on a copy of the database if you have one.
If you unsuspend first, the service still carries the old due date and the next cron run suspends it again. Correct the next due date, then use Unsuspend.
We ran each query on a test database with one row that should match and rows that should not: a suspension for abuse, a payment from yesterday, a free account. Neither of our two live installs has a suspended service today, so all three return nothing there.
DMS.S3 — The queries
The service says it is paid up and is still off. Usually the date was fixed after the suspension and nobody clicked Unsuspend.
SELECT id, userid, domain, nextduedate, suspendreason
FROM tblhosting
WHERE domainstatus = 'Suspended' AND suspendreason LIKE 'Overdue%'
AND nextduedate >= CURDATE();
The suspension that is coming: the invoice for the current due date is Paid, yet the service still points at that date. Payments from the last two days are left out so a cron that has not run yet does not show up.
SELECT h.id, h.userid, h.domain, h.nextduedate, i.id AS invoice_id, i.datepaid
FROM tblinvoiceitems ii
JOIN tblinvoices i ON i.id = ii.invoiceid
JOIN tblhosting h ON h.id = ii.relid
WHERE ii.type = 'Hosting' AND i.status = 'Paid' AND ii.duedate = h.nextduedate
AND h.domainstatus IN ('Active', 'Suspended')
AND h.billingcycle NOT IN ('Free Account', 'One Time')
AND i.datepaid < CURDATE() - INTERVAL 2 DAY;
Overdue and suspended, but no Unpaid invoice for the service, so the client area offers nothing to pay. Often the invoice was cancelled.
SELECT h.id, h.userid, h.domain, h.nextduedate
FROM tblhosting h
WHERE h.domainstatus = 'Suspended' AND h.nextduedate > '1000-01-01' AND h.nextduedate < CURDATE()
AND h.billingcycle NOT IN ('Free Account', 'One Time')
AND NOT EXISTS (SELECT 1 FROM tblinvoiceitems ii JOIN tblinvoices i ON i.id = ii.invoiceid
WHERE ii.type = 'Hosting' AND ii.relid = h.id
AND i.status IN ('Unpaid', 'Payment Pending', 'Overdue'));
DMS.S4 — The addon
Brasa Billing Audit runs these three checks with the rest of its billing checks, links each finding to the service and e-mails admins when a new one appears. It never changes a service, an invoice or a payment.

$39 per year
Finds the billing records that do not add up.
DMS.S5 — Questions
The cron reads the next due date on the service. WHMCS moves it only when the payment runs its own paid-invoice step. An invoice flipped to Paid another way (by hand, by the UpdateInvoice API or by a gateway module that closes it after removing a late fee) stays Paid while the service keeps the old date, so the cron still sees it as overdue.
Open the service under the client, set the next due date to the end of the period that was paid and save. Then click Unsuspend under Module Commands so the server account comes back. In the other order, the next cron run suspends it again.
If the period was already paid, move the next due date and unsuspend. If it was not, the invoice was usually cancelled: set it back to Unpaid on the invoice page so the client can pay it, and the payment moves the due date.
DMS.S6 — Start a project
Tell us how the payment was recorded. If other hosts would hit it, it may become a check.