Some cosmetic updates for orders
This commit is contained in:
@@ -50,26 +50,49 @@ class Service extends Model
|
||||
];
|
||||
|
||||
private $inactive_status = [
|
||||
'CANCELLED', // @todo Check if these should be changed to ORDER-CANCELLED
|
||||
'CANCELLED',
|
||||
'ORDER-REJECTED',
|
||||
'ORDER-CANCELLED',
|
||||
];
|
||||
|
||||
private $valid_status = [
|
||||
'ORDER-SUBMIT' => ['approve'=>'ORDER-SENT','reject'=>'ORDER-REJECTED'],
|
||||
// Order Submitted
|
||||
'ORDER-SUBMIT' => ['approve'=>'ORDER-SENT','hold'=>'ORDER-HOLD','reject'=>'ORDER-REJECTED','cancel'=>'ORDER-CANCELLED'],
|
||||
// Order On Hold (Reason)
|
||||
'ORDER-HOLD' => [],
|
||||
// Order Rejected (Reason)
|
||||
'ORDER-REJECTED' => [],
|
||||
// Order Cancelled
|
||||
'ORDER-CANCELLED' => [],
|
||||
// Order Sent to Supplier
|
||||
'ORDER-SENT' => ['update_reference'=>'ORDER-SENT'],
|
||||
];
|
||||
|
||||
/**
|
||||
* Account the service belongs to
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function account()
|
||||
{
|
||||
return $this->belongsTo(Account::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Account that ordered the service
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function orderby()
|
||||
{
|
||||
return $this->belongsTo(Account::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tenant that the service belongs to
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function site()
|
||||
{
|
||||
return $this->belongsTo(Site::class);
|
||||
@@ -100,6 +123,11 @@ class Service extends Model
|
||||
return $this->belongsTo(ServiceVoip::class,'id','service_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Product of the service
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function product()
|
||||
{
|
||||
return $this->belongsTo(Product::class);
|
||||
|
Reference in New Issue
Block a user