@php $currency = \App\Support\StorefrontPresenter::currencySymbol(); $rows = [ 'Base fare' => $pricing['base_fare'] ?? 0, 'Weight charge' => $pricing['weight_charge'] ?? 0, 'Distance charge'.(isset($pricing['distance_km']) ? ' ('.$pricing['distance_km'].' km)' : '') => $pricing['distance_charge'] ?? 0, 'Delivery speed' => $pricing['delivery_option_charge'] ?? 0, 'Insurance' => $pricing['insurance'] ?? 0, 'Platform fee' => $pricing['platform_fee'] ?? 0, 'Tax' => $pricing['tax'] ?? 0, ]; @endphp
@foreach($rows as $label => $amount) @if((float) $amount > 0 || in_array($label, ['Base fare', 'Platform fee', 'Tax'], true))
{{ $label }} {{ $currency }}{{ number_format((float) $amount, 2) }}
@endif @endforeach
Total {{ $currency }}{{ number_format((float) ($pricing['total'] ?? 0), 2) }}