Invoice Widgets completed
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Enumerations\InvoiceStatus;
|
||||
use App\Scopes\InstancedModel;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* @property string $tenant
|
||||
@@ -65,4 +67,12 @@ class Invoice extends InstancedModel
|
||||
'denied_at',
|
||||
'denied_reason',
|
||||
];
|
||||
|
||||
public function costUnit() : BelongsTo{
|
||||
return $this->belongsTo(CostUnit::class);
|
||||
}
|
||||
|
||||
public function status() : BelongsTo {
|
||||
return $this->belongsTo(InvoiceStatus::class, 'status')->first();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user