Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 4.8.0-b1
-
Component/s: None
-
Labels:None
Description
When suspending services, it is reported that the cron may be evaluating the time since the invoice was past due + the "Suspend Services Days After Due" setting in whether to suspend the service. Because of this, some services may not be suspended for 2 days even if the Suspend Services Days After Due setting is set to 1 day.
For example:
- Invoice was due 2019-06-15 12:00:00
- Suspend Services Days After Due is 1 day
- Suspend Services cron is run at 2019-06-16 00:00:00
Because only 12 hours elapsed since the invoice was due, even though the calendar day has changed, the service is not suspended. However, if the cron were set to run at/after 12:00:00 then it would have been suspended because the current calculation is "2019-06-15 12:00:00" + "1 day" = "2019-06-16 12:00:00".
A workable solution may be to evaluate the day difference between the invoice due date and cron task run time from midnight in the company timezone.