@include('flash::message')
@if ($errors->any())
@endif
@php
$vat = 0;
$rate = ($vatRate ?? 10) / 100;
$subtotal = 0;
@endphp
@isset($cart)
{{ $subtotal + $vat }}
{{ $subtotal }}
-
@foreach ($errors->all() as $error)
- {{ $error }} @endforeach
@if(count($cart) > 0)
@foreach ($cart as $item)
@php
$product = $item?->product;
$cost = $item->quantity * $product->price;
$subtotal += $cost;
$vat += $cost * $rate;
@endphp
@endforeach
@else
@endif
@endisset
{{ $product->name }}
{{ __('products.cost') }}: {{ $cost }} SAR
{{ __('products.empty_cart') }}