Added schedule:list, fixed traffic import service, fixed invoice generation with charges and credit amounts

This commit is contained in:
Deon George
2020-05-29 14:10:10 +10:00
parent 7f1681f0b7
commit 121aa5b31c
6 changed files with 67 additions and 7 deletions

View File

@@ -1231,7 +1231,7 @@ class Service extends Model
}
// Add additional charges
if (($future == TRUE OR ($future == FALSE AND ($this->invoice_to < Carbon::now()->addDays(30))))
if (($future == TRUE OR ($future == FALSE AND ($this->invoice_to >= Carbon::now()->addDays(30))))
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) {