@php $client = $service->client; $product= $service->product; $product_group = $product->productGroups()->first(); $price_total = $service->getPriceTotal(); $price_detailed = $service->getPriceDetailed(); $currency = $service->price->currency; $period = $service->price->period; @endphp
@foreach (['setup', 'base', 'idle', 'switch_down', 'switch_up', 'uninstall'] as $key) @if (!empty($price_total[$key])) @endif @endforeach @if (!empty($price_detailed['options'])) @foreach ($price_detailed['options'] as $option) @endforeach @endif
Client
{{ $client->company_name ? $client->company_name . ' (' . $client->firstname . ' ' . $client->lastname . ')' : $client->firstname . ' ' . $client->lastname }}
Service
{{ $product->name ?? $product->key }} {{ $service->admin_label }}
Order Summary
Product Group: {{ $product_group->name ?? $product_group->key }}
Product: {{ $product->name ?? $product->key }}
Order Date: {{ $service->order_date }}
Billing Period: {{ ucfirst($period) }}
Price Breakdown
{{ ucfirst(str_replace('_', ' ', $key)) }}: {{ $price_total[$key] }} {{ $currency->code }}
Ordered Options
{{ $option['product_option_group_key'] }}: {{ $option['product_option_key'] }} – {{ $option['price']['base'] ?? '0' }} {{ $price_detailed['currency']['code'] }}