| @lang('modules.menu.itemName') | @lang('modules.order.qty') | @lang('modules.order.amount') | @lang('app.action') | |
|---|---|---|---|---|
|
{{ $item->item_name }}
{{ isset($orderItemVariation[$key]) ? $orderItemVariation[$key]->variation : '' }}
@if (!empty($itemModifiersSelected[$key]))
@foreach ($itemModifiersSelected[$key] as $modifierOptionId)
--}}
@endif
@php
// Get menu item object
$menuItemObj = isset($orderItemVariation[$key]) && $orderItemVariation[$key]
? $orderItemVariation[$key]->menuItem
: (isset($orderItemList[$key]) ? $orderItemList[$key] : null);
// Get original base price (before promotion and modifiers)
$originalBasePrice = isset($orderItemVariation[$key]) && $orderItemVariation[$key]
? $orderItemVariation[$key]->price
: ($menuItemObj ? $menuItemObj->price : 0);
// Get promotional price (applies promotion if available) - pass branch ID for correct promotion lookup
$promotionalBasePrice = $menuItemObj ? $menuItemObj->getPromotionalPrice($originalBasePrice, branch()?->id) : $originalBasePrice;
// Add modifier prices
$modifierPrice = $this->orderItemModifiersPrice[$key] ?? 0;
// Check if there's a discount (promotional base price differs from original base price)
$hasDiscount = $menuItemObj && abs($promotionalBasePrice - $originalBasePrice) > 0.01;
@endphp
@if($hasDiscount && $menuItemObj)
@php
$promotion = $menuItemObj->getActivePromotion(branch()?->id);
$discountPercent = $promotion && $promotion->discount_type === 'percent'
? number_format($promotion->discount_value, 0)
: 0;
@endphp
{{ $this->modifierOptions[$modifierOptionId]->name }}
{{ currency_format($this->modifierOptions[$modifierOptionId]->price, restaurant()->currency_id) }}
@endforeach
{{--
@if($discountPercent > 0)
{{ $discountPercent }}% OFF
@else
@lang('app.discount')
@endif
@endif
|
|
@php
// Get menu item object
$menuItemObj = isset($orderItemVariation[$key]) && $orderItemVariation[$key]
? $orderItemVariation[$key]->menuItem
: (isset($orderItemList[$key]) ? $orderItemList[$key] : null);
// Get original base price (before promotion and modifiers)
$originalBasePrice = isset($orderItemVariation[$key]) && $orderItemVariation[$key]
? $orderItemVariation[$key]->price
: ($menuItemObj ? $menuItemObj->price : 0);
// Get promotional price (applies promotion if available) - pass branch ID for correct promotion lookup
$promotionalBasePrice = $menuItemObj ? $menuItemObj->getPromotionalPrice($originalBasePrice, branch()?->id) : $originalBasePrice;
// Add modifier prices
$modifierPrice = $this->orderItemModifiersPrice[$key] ?? 0;
// Final display price (with promotion and modifiers) - use the method for consistency
$displayPrice = $this->getItemDisplayPrice($key);
// Check if there's a discount (promotional base price differs from original base price)
$hasDiscount = $menuItemObj && abs($promotionalBasePrice - $originalBasePrice) > 0.01;
// Calculate original total price for strikethrough (original base + modifiers)
$originalTotalPrice = $originalBasePrice + $modifierPrice;
// Total amount per line (what customer pays)
$totalAmount = $orderItemAmount[$key];
@endphp
{{ currency_format($totalAmount, restaurant()->currency_id) }} | ||
|
@lang('messages.noItemAdded')
|
||||
{{ $validationMessage }}
Quick Service Mode
@lang('modules.order.reservationFor'): {{ $this->reservationCustomer?->name ?? 'N/A' }}
@lang('modules.order.reservationTime'): {{ $this->reservation?->reservation_date_time?->format('M d, Y g:i A') ?? 'N/A' }}
@lang('modules.order.isThisSameCustomer')
{{ __('modules.order.customerInfoDescription') }}
{{ __('modules.order.customerFound') }}
@elseif($customerMobile && !$customerSearching){{ __('modules.order.customerNotFoundCreateNew') }}
@endif