Add more details to Service Movements
This commit is contained in:
parent
72fcdab84e
commit
a9f545412b
@ -25,6 +25,7 @@ class Service extends Model
|
|||||||
'admin_service_id_url',
|
'admin_service_id_url',
|
||||||
'category',
|
'category',
|
||||||
'name',
|
'name',
|
||||||
|
'name_full',
|
||||||
'next_invoice',
|
'next_invoice',
|
||||||
'product_name',
|
'product_name',
|
||||||
'service_id',
|
'service_id',
|
||||||
@ -40,6 +41,7 @@ class Service extends Model
|
|||||||
'data_orig',
|
'data_orig',
|
||||||
'id',
|
'id',
|
||||||
'name',
|
'name',
|
||||||
|
'name_full',
|
||||||
'next_invoice',
|
'next_invoice',
|
||||||
'product_name',
|
'product_name',
|
||||||
'service_id',
|
'service_id',
|
||||||
@ -144,6 +146,14 @@ class Service extends Model
|
|||||||
return $this->ServicePlugin()->name;
|
return $this->ServicePlugin()->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getNameFullAttribute()
|
||||||
|
{
|
||||||
|
if (! isset($this->ServicePlugin()->full_name))
|
||||||
|
return 'Unknown';
|
||||||
|
|
||||||
|
return $this->ServicePlugin()->full_name;
|
||||||
|
}
|
||||||
|
|
||||||
public function getNextInvoiceAttribute()
|
public function getNextInvoiceAttribute()
|
||||||
{
|
{
|
||||||
return $this->date_next_invoice ? $this->date_next_invoice->format('Y-m-d') : NULL;
|
return $this->date_next_invoice ? $this->date_next_invoice->format('Y-m-d') : NULL;
|
||||||
|
@ -12,6 +12,13 @@ class ServiceAdsl extends Model
|
|||||||
protected $table = 'ab_service__adsl';
|
protected $table = 'ab_service__adsl';
|
||||||
public $timestamps = FALSE;
|
public $timestamps = FALSE;
|
||||||
|
|
||||||
|
public function getFullNameAttribute()
|
||||||
|
{
|
||||||
|
return ($this->service_number AND $this->service_address)
|
||||||
|
? sprintf('%s: %s',$this->service_number, $this->service_address)
|
||||||
|
: $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
public function getNameAttribute()
|
public function getNameAttribute()
|
||||||
{
|
{
|
||||||
return $this->service_number ?: $this->service_address;
|
return $this->service_number ?: $this->service_address;
|
||||||
|
@ -11,6 +11,13 @@ class ServiceVoip extends Model
|
|||||||
protected $table = 'ab_service__voip';
|
protected $table = 'ab_service__voip';
|
||||||
public $timestamps = FALSE;
|
public $timestamps = FALSE;
|
||||||
|
|
||||||
|
public function getFullNameAttribute()
|
||||||
|
{
|
||||||
|
return ($this->service_number AND $this->service_address)
|
||||||
|
? sprintf('%s: %s',$this->service_number, $this->service_address)
|
||||||
|
: $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
public function getNameAttribute()
|
public function getNameAttribute()
|
||||||
{
|
{
|
||||||
return $this->service_number;
|
return $this->service_number;
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
@endif
|
@endif
|
||||||
},
|
},
|
||||||
{ data: "account_name" },
|
{ data: "account_name" },
|
||||||
{ data: "name" },
|
{ data: "name_full" },
|
||||||
{ data: "status" },
|
{ data: "status" },
|
||||||
{ data: "product_name" }
|
{ data: "product_name" }
|
||||||
],
|
],
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
@endif
|
@endif
|
||||||
},
|
},
|
||||||
{ data: "account_name" },
|
{ data: "account_name" },
|
||||||
{ data: "name" },
|
{ data: "name_full" },
|
||||||
{ data: "status" },
|
{ data: "status" },
|
||||||
{ data: "product_name" }
|
{ data: "product_name" }
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user