Code refactor work. New optimised query to get invoice status summary for an account
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Awobaz\Compoships\Compoships;
|
||||
use Carbon\Carbon;
|
||||
use Clarkeash\Doorman\Facades\Doorman;
|
||||
use Clarkeash\Doorman\Models\Invite;
|
||||
@@ -11,7 +10,7 @@ use Illuminate\Support\Arr;
|
||||
use Leenooks\Traits\ScopeActive;
|
||||
|
||||
use App\Interfaces\IDs;
|
||||
use App\Traits\{PushNew,SiteID};
|
||||
use App\Traits\PushNew;
|
||||
|
||||
/**
|
||||
* Class Invoice
|
||||
@@ -34,14 +33,11 @@ use App\Traits\{PushNew,SiteID};
|
||||
*/
|
||||
class Invoice extends Model implements IDs
|
||||
{
|
||||
use Compoships,PushNew,ScopeActive,SiteID;
|
||||
use PushNew,ScopeActive;
|
||||
|
||||
protected $casts = [
|
||||
'reminders'=>'json',
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'due_at',
|
||||
'due_at'=>'datetime:y-m-d',
|
||||
];
|
||||
|
||||
public const BILL_WEEKLY = 0;
|
||||
@@ -105,11 +101,6 @@ class Invoice extends Model implements IDs
|
||||
];
|
||||
*/
|
||||
|
||||
// Caching variables
|
||||
private int $_paid = 0;
|
||||
private int $_total = 0;
|
||||
private int $_total_tax = 0;
|
||||
|
||||
/* STATIC METHODS */
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user