set/update/delete billing alert

This commit is contained in:
Čarodej
2021-12-17 10:44:50 +01:00
parent 04e46b7fcb
commit afb8323541
13 changed files with 307 additions and 96 deletions
@@ -1,5 +1,4 @@
<?php
namespace Support\Scheduler\Actions;
use DB;
@@ -12,7 +11,7 @@ class ReportUsageAction
Subscription::whereIn('type', ['pre-paid', 'auto-renew'])
->where('status', 'active')
->cursor()
->each(function($subscription) {
->each(function ($subscription) {
$this->recordBandwidth($subscription);
$this->recordStorageCapacity($subscription);
});
@@ -46,4 +45,4 @@ class ReportUsageAction
// Record storage capacity usage
$subscription->recordUsage('bandwidth', $amount);
}
}
}