More work on moving service updates to use components, move 'host' to 'hosting', move some redundant views

This commit is contained in:
2024-08-01 17:34:31 +10:00
parent 078dc6ab39
commit f8453ae391
18 changed files with 120 additions and 476 deletions

View File

@@ -64,12 +64,14 @@ abstract class Type extends Model implements ServiceItem
public function hasExpired(): bool
{
return (! $this->inContract()) && ($this->service->invoice_next_at && $this->service->invoice_next_at->isPast());
return (! $this->inContract())
&& ($this->service->invoice_next && $this->service->invoice_next->isPast());
}
public function inContract(): bool
{
return $this->expire_at && $this->expire_at->isFuture();
return $this->expire_at
&& $this->expire_at->isFuture();
}
/* ATTRIBUTES */