@if (count($orderItemList) > 0 && user_can('Update Order') && user_can('Add Discount on POS'))
@lang('modules.order.addDiscount')
@endif
@lang('modules.order.totalItem')
{{ count($orderItemList) }}
@lang('modules.order.subTotal')
{{ currency_format($subTotal, restaurant()->currency_id) }}
@if ($discountAmount)
@lang('modules.order.discount') @if ($discountType == 'percent')
({{ $discountValue }}%)
@endif
-{{ currency_format($discountAmount, restaurant()->currency_id) }}
@endif
@foreach ($extraCharges as $charge)
{{ $charge->charge_name }}
@if ($charge->charge_type == 'percent')
({{ $charge->charge_value }}%)
@endif
@if (user_can('Update Order'))
@endif
{{ currency_format($charge->getAmount($subTotal - ($discountAmount ?? 0)), restaurant()->currency_id) }}
@endforeach
@if ($tipAmount > 0)
@lang('modules.order.tip')
{{ currency_format($tipAmount, restaurant()->currency_id) }}
@endif
@if ($orderType === 'delivery' && !is_null($deliveryFee))
@lang('modules.delivery.deliveryFee')
@if ($deliveryFee > 0)
{{ currency_format($deliveryFee, restaurant()->currency_id) }}
@else
@lang('modules.delivery.freeDelivery')
@endif
@endif
@if ($taxMode == 'order')
@foreach ($taxes as $item)
{{ $item->tax_name }} ({{ $item->tax_percent }}%)
{{ currency_format(($item->tax_percent / 100) * ($subTotal - ($discountAmount ?? 0)), restaurant()->currency_id) }}
@endforeach
@else
@php
$taxTotals = [];
foreach ($orderItemTaxDetails as $item) {
$qty = $item['qty'] ?? 1;
if (!empty($item['tax_breakup'])) {
foreach ($item['tax_breakup'] as $taxName => $taxInfo) {
if (!isset($taxTotals[$taxName])) {
$taxTotals[$taxName] = [
'percent' => $taxInfo['percent'],
'amount' => 0
];
}
$taxTotals[$taxName]['amount'] += $taxInfo['amount'] * $qty;
}
}
}
@endphp
@foreach ($taxTotals as $taxName => $taxInfo)
{{ $taxName }} ({{ $taxInfo['percent'] }}%)
{{ currency_format($taxInfo['amount'], restaurant()->currency_id) }}
@endforeach
@lang('modules.order.totalTax')
{{ currency_format($totalTaxAmount, restaurant()->currency_id) }}
@endif
@lang('modules.order.total')
{{ currency_format($total, restaurant()->currency_id) }}
@if ($orderDetail->status == 'kot' && user_can('Update Order'))
@lang('modules.order.newKot')
@if (user_can('Delete Order'))
@endif
@endif
@if ($orderDetail->status == 'billed' && user_can('Update Order'))
@endif
@if ($orderType == 'delivery' && $orderDetail->delivery_address)
@if ($orderDetail->customer)
{{ $orderDetail->customer->name }}
@endif
@lang('modules.customer.address')
@if ($orderDetail->customer_lat && $orderDetail->customer_lng && branch()->lat && branch()->lng)
@lang('modules.order.viewOnMap')
@endif
{!! nl2br(e($orderDetail->delivery_address)) !!}
@endif