Add more details to Service Movements
This commit is contained in:
@@ -25,6 +25,7 @@ class Service extends Model
|
||||
'admin_service_id_url',
|
||||
'category',
|
||||
'name',
|
||||
'name_full',
|
||||
'next_invoice',
|
||||
'product_name',
|
||||
'service_id',
|
||||
@@ -40,6 +41,7 @@ class Service extends Model
|
||||
'data_orig',
|
||||
'id',
|
||||
'name',
|
||||
'name_full',
|
||||
'next_invoice',
|
||||
'product_name',
|
||||
'service_id',
|
||||
@@ -144,6 +146,14 @@ class Service extends Model
|
||||
return $this->ServicePlugin()->name;
|
||||
}
|
||||
|
||||
public function getNameFullAttribute()
|
||||
{
|
||||
if (! isset($this->ServicePlugin()->full_name))
|
||||
return 'Unknown';
|
||||
|
||||
return $this->ServicePlugin()->full_name;
|
||||
}
|
||||
|
||||
public function getNextInvoiceAttribute()
|
||||
{
|
||||
return $this->date_next_invoice ? $this->date_next_invoice->format('Y-m-d') : NULL;
|
||||
|
Reference in New Issue
Block a user