{{-- Service main prices --}}
@php
$serviceLabels = [
'setup' => 'Setup',
'base' => 'Base',
'idle' => 'Idle',
'switch_down' => 'Switch Down',
'switch_up' => 'Switch Up',
'uninstall' => 'Uninstall'
];
@endphp
@foreach($serviceLabels as $key => $label)
@php
$value = $service->price_detailed['service'][$key] ?? 0;
@endphp
@if($value > 0)
{{ __('main.' . $label) }}
{{ $service->price_detailed['currency']['prefix'] }}
{{ number_format_custom($value, 2, $client->currency->format) }}
{{ $service->price_detailed['currency']['suffix'] }}
@endif
@endforeach
{{-- Options --}}
@foreach($service->price_detailed['options'] as $option)
@php
$hasPrice = collect($option['price'])->filter(fn($v) => $v > 0)->isNotEmpty();
@endphp
@if($hasPrice)
{{ $option['model']->name }}
@foreach($serviceLabels as $key => $label)
@php
$value = $option['price'][$key] ?? 0;
@endphp
@if($value > 0)
{{ __('main.' . $label) }}
{{ $service->price_detailed['currency']['prefix'] }}
{{ number_format_custom($value, 2, $client->currency->format) }}
{{ $service->price_detailed['currency']['suffix'] }}
@endif
@endforeach
@endif
@endforeach