@lang('modules.order.addNote')
@lang('modules.order.addNote')
@lang('modules.order.totalItem')
{{ count($orderItemList) }}
@lang('modules.order.subTotal')
{{ currency_format($subTotal, $restaurant->currency_id) }}
@if (
count($orderItemList) > 0 && $this->applicableExtraCharges && count($this->applicableExtraCharges) > 0
)
@foreach ($this->applicableExtraCharges as $charge)
{{ $charge->charge_name }}
@if ($charge->charge_type == 'percent')
({{ $charge->charge_value }}%)
@endif
{{ currency_format($charge->getAmount($subTotal), $restaurant->currency_id) }}
@endforeach
@endif
@if ($taxMode == 'order')
@foreach ($taxes ?? [] as $item)
{{ $item->tax_name }} ({{ $item->tax_percent }}%)
{{ currency_format(($item->tax_percent / 100) * $taxBase, $restaurant->currency_id) }}
@endforeach
@else
@if (!empty($orderItemTaxDetails) && count($orderItemTaxDetails))
@php
$taxTotals = [];
$totalTax = 0;
foreach ($orderItemTaxDetails as $item) {
$qty = $item['qty'] ?? 1;
foreach ($item['tax_breakup'] as $taxName => $taxInfo) {
if (!isset($taxTotals[$taxName])) {
$taxTotals[$taxName] = [
'percent' => $taxInfo['percent'],
'amount' => $taxInfo['amount'] * $qty,
];
} else {
$taxTotals[$taxName]['amount'] += $taxInfo['amount'] * $qty;
}
}
$totalTax += collect($item['tax_amount'])->sum();
}
@endphp
@foreach ($taxTotals as $taxName => $taxInfo)
{{ $taxName }} ({{ $taxInfo['percent'] }}%)
{{ currency_format($taxInfo['amount'], $restaurant->currency_id) }}
@endforeach
@lang('modules.order.totalTax')
@lang($restaurant?->tax_inclusive ? 'modules.settings.taxInclusive' : 'modules.settings.taxExclusive')
{{ currency_format($totalTax, $restaurant->currency_id) }}
@endif
@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(function_exists('module_enabled') && module_enabled('Loyalty') && function_exists('restaurant_modules') && in_array('Loyalty', restaurant_modules()))
@include('loyalty::components.loyalty-discount-display', [
'loyaltyPointsRedeemed' => $loyaltyPointsRedeemed ?? 0,
'loyaltyDiscountAmount' => $loyaltyDiscountAmount ?? 0,
'currencyId' => $restaurant->currency_id,
'showEditIcon' => true,
])
@endif
@lang('modules.order.total')
{{ currency_format($total, $restaurant->currency_id) }}
@if ($orderType === 'delivery' && !empty($deliveryAddress))
@if (is_null($customer) && ($restaurant->customer_login_required || $orderTypeSlug == 'delivery'))
@lang('app.next')
@elseif ($orderTypeSlug == 'pickup')
@if (is_null($customer))
@lang('app.next')
@else
@lang('app.next')
@endif
@else
@php
$isPaymentEnabled =
in_array($orderTypeSlug, ['dine_in', 'delivery', 'pickup']) &&
(($orderTypeSlug == 'dine_in' && $paymentGateway->is_dine_in_payment_enabled) ||
($orderTypeSlug == 'delivery' &&
$paymentGateway->is_delivery_payment_enabled) ||
($orderTypeSlug == 'pickup' && $paymentGateway->is_pickup_payment_enabled));
$showPayNow =
$paymentGateway->is_qr_payment_enabled ||
$paymentGateway->stripe_status ||
$paymentGateway->razorpay_status ||
$paymentGateway->flutterwave_status ||
$paymentGateway->paypal_status ||
$paymentGateway->payfast_status ||
$paymentGateway->paystack_status ||
$paymentGateway->xendit_status ||
$paymentGateway->epay_status ||
$paymentGateway->mollie_status ||
$paymentGateway->tap_status ||
count($offlinePaymentMethods) > 0;
$loadingSpinner = '
';
@endphp
@if (!$order)
@if ($showPayNow)
{!! $loadingSpinner !!}
@lang('modules.order.payNow')
@if (!$isPaymentEnabled)
{!! $loadingSpinner !!}
@lang('modules.order.payLater')
@endif
@else
{!! $loadingSpinner !!}
@lang('modules.order.placeOrder')
@endif
@else
{!! $loadingSpinner !!}
@lang('modules.order.placeOrder')
@endif
@endif