Show service detail on invoices
This commit is contained in:
@@ -26,7 +26,9 @@ use App\Traits\NextKey;
|
||||
*
|
||||
* Attributes for services:
|
||||
* + billing_period : The period that this service is billed for by default
|
||||
* + name : Service short name with service address
|
||||
* + name_short : Service Product short name, eg: phone number, domain name, certificate CN
|
||||
* + name_detail : Service Detail, eg: service_address
|
||||
* + sid : System ID for service
|
||||
*
|
||||
* @package App\Models
|
||||
@@ -697,7 +699,7 @@ class Service extends Model implements IDs
|
||||
|
||||
public function getNameAttribute(): string
|
||||
{
|
||||
return $this->product->name_short.': '.$this->getNameShortAttribute();
|
||||
return $this->getNameShortAttribute().(($x=$this->getNameDetailAttribute()) ? ': '.$x : '');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -712,6 +714,11 @@ class Service extends Model implements IDs
|
||||
return $this->type ? $this->type->service_name : $this->id;
|
||||
}
|
||||
|
||||
public function getNameDetailAttribute()
|
||||
{
|
||||
return $this->type ? $this->type->service_address : $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated see getInvoiceNextAttribute()
|
||||
*/
|
||||
|
Reference in New Issue
Block a user