diff --git a/app/Models/Service.php b/app/Models/Service.php index 105502a..d97f297 100644 --- a/app/Models/Service.php +++ b/app/Models/Service.php @@ -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() */ diff --git a/resources/views/theme/backend/adminlte/u/invoice/home.blade.php b/resources/views/theme/backend/adminlte/u/invoice/home.blade.php index 35dd749..5f75c5a 100644 --- a/resources/views/theme/backend/adminlte/u/invoice/home.blade.php +++ b/resources/views/theme/backend/adminlte/u/invoice/home.blade.php @@ -109,7 +109,7 @@ @foreach ($o->product_services($po) as $so)   - Service: {{ $so->sid }}: {{ $so->name }} + Service: {{ $so->sid }}: [{{ $so->name }}]   ${{ number_format($o->product_service_items($po,$so)->sum('total'),$o->currency()->rounding) }}   @@ -205,9 +205,11 @@ Pay + {{-- Download PDF + --}} @endif