@extends('menu.layouts.app') @section('content')

{{ __('menu.cart') }}

close
@if (isset($table))

{{ __('menu.table_label') }}: {{ $table->name }}

@endif
@if (count($cart) > 0)
    @foreach ($cart as $productId => $item)
  • {{ $item['name'] }}

    {{ number_format($item['price'] * $item['quantity'], 0, ',', '.') }}TL

  • @endforeach
{{ __('menu.total_amount') }}:

{{ number_format($cartTotal, 0, ',', '.') }}TL

@if(isset($paymentCollection) && $paymentCollection === 'prepayment') @php $balance = $customerBalance ?? 0; $sufficient = $balance >= $cartTotal; $remaining = $balance - $cartTotal; $shortage = $cartTotal - $balance; @endphp @if($sufficient)
account_balance_wallet {{ __('menu.pay_with_balance') }}
{{ __('menu.your_balance') }}: ₺{{ number_format($balance, 2, ',', '.') }}
{{ __('menu.remaining_after_order') }}: ₺{{ number_format($remaining, 2, ',', '.') }}
@else
account_balance_wallet {{ __('menu.insufficient_balance') }}!
{{ __('menu.your_balance') }}: ₺{{ number_format($balance, 2, ',', '.') }}
{{ __('menu.shortage_amount') }}: ₺{{ number_format($shortage, 2, ',', '.') }}
@endif @endif {{--
--}}
@if(isset($paymentCollection) && $paymentCollection === 'prepayment' && ($customerBalance ?? 0) < $cartTotal) @else @endif
@else
shopping_cart

{{ __('menu.empty_cart') }}

@endif
@include('menu.components.navbar')
@if (count($cart) > 0) @endif @endsection @section('js') @endsection