Change ScopeServiceUserAuthorised to ScopeAccountUserAuthorised. Scope payments to AccountUserAuthorised, and added PaymentPolicy
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 55s
Create Docker Image / Final Docker Image Manifest (push) Successful in 12s

This commit is contained in:
2024-08-10 23:53:13 +10:00
parent f60727f5fb
commit ef0d4dc773
11 changed files with 150 additions and 56 deletions

View File

@@ -16,7 +16,7 @@ use Leenooks\Casts\LeenooksCarbon;
use App\Models\Product\Type;
use App\Interfaces\IDs;
use App\Traits\{ScopeServiceActive,ScopeServiceUserAuthorised};
use App\Traits\{ScopeAccountUserAuthorised,ScopeServiceActive};
/**
* Class Service
@@ -52,7 +52,7 @@ use App\Traits\{ScopeServiceActive,ScopeServiceUserAuthorised};
*/
class Service extends Model implements IDs
{
use HasFactory,ScopeServiceActive,ScopeServiceUserAuthorised;
use HasFactory,ScopeAccountUserAuthorised,ScopeServiceActive;
protected $casts = [
'order_info' => AsCollection::class,
@@ -280,7 +280,7 @@ class Service extends Model implements IDs
{
return (new self)
->ServiceActive()
->ServiceUserAuthorised($uo)
->AccountUserAuthorised(NULL,$uo)
->where('order_status','!=','ACTIVE')
->with(['account','product'])
->get();