Move charge actions to ChargeController, implemented charge delete

This commit is contained in:
2024-07-26 12:33:42 +10:00
parent 756f550b43
commit 9380850395
7 changed files with 107 additions and 70 deletions

View File

@@ -1275,7 +1275,7 @@ class Service extends Model implements IDs
if ((($future == TRUE) OR (($future == FALSE) AND ($this->invoice_to >= $billdate)))
AND ! $this->invoice_items->filter(function($item) { return $item->module_id == 30 AND ! $item->exists; })->count())
{
foreach ($this->charges->filter(function($item) { return ! $item->processed; }) as $oo) {
foreach ($this->charges->filter(function($item) { return $item->unprocessed; }) as $oo) {
$o = new InvoiceItem;
$o->active = TRUE;
$o->service_id = $oo->service_id;