Fixes for service change, validation added for date and product_id
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 32s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s

This commit is contained in:
2024-08-17 15:10:50 +10:00
parent 23f23dfe40
commit 283ae06a5c
6 changed files with 85 additions and 42 deletions

View File

@@ -1065,6 +1065,11 @@ class Service extends Model implements IDs
return ! is_null($this->price);
}
public function isContract(): bool
{
return $this->getContractEndAttribute()->greaterThan(Carbon::now());
}
/**
* Identify if a service is being ordered, ie: not active yet nor cancelled
*