@lang('modules.order.subTotal')
{{ currency_format($order->sub_total, $restaurant->currency_id) }}
@if (!is_null($order->discount_amount))
@lang('modules.order.discount') @if ($order->discount_type == 'percent')
({{ rtrim(rtrim(number_format($order->discount_value, 2), '0'), '.') }}%)
@endif
-{{ currency_format($order->discount_amount, $restaurant->currency_id) }}
@endif
@foreach ($order->charges as $item)
{{ $item->charge->charge_name }}
@if ($item->charge->charge_type == 'percent')
({{ $item->charge->charge_value }}%)
@endif
{{ currency_format(($item->charge->getAmount($order->sub_total - ($order->discount_amount ?? 0))) , $restaurant->currency_id) }}
@endforeach
@foreach ($order->taxes as $item)
{{ $item->tax->tax_name }} ({{ $item->tax->tax_percent }}%)
{{ currency_format(($item->tax->tax_percent / 100) * ($order->sub_total - ($order->discount_amount ?? 0)), $restaurant->currency_id) }}
@endforeach
@if ($order->order_type === 'delivery' && !is_null($order->delivery_fee))
@lang('modules.delivery.deliveryFee')
@if($order->delivery_fee > 0)
{{ currency_format($order->delivery_fee, $restaurant->currency_id) }}
@else
@lang('modules.delivery.freeDelivery')
@endif
@endif
@if ($canAddTip || $order->tip_amount > 0)
@lang('modules.order.tip')
@if($order->tip_amount > 0 && $order->tip_note)
"{{ $order->tip_note }}"
@endif
@if($order->tip_amount > 0 && !$canAddTip)
{{ currency_format($order->tip_amount, $restaurant->currency_id) }}
@endif
@if($canAddTip)
@if($order->tip_amount > 0)
{{ currency_format($order->tip_amount, $restaurant->currency_id) }}
@else
@lang('modules.order.addTip')
@endif
@endif
@endif
@lang('modules.order.total')
{{ currency_format($order->total, $restaurant->currency_id) }}