Checkout
@php $totale_price = 0; $date_check = 0; @endphp
@if(count($carts) > 0)
@foreach($carts as $value)
@if($value->package)
{{config('app.covid_currency')}}{{ @($value->quantity) ? number_format($value->package->price * $value->quantity, 2, '.', '') : number_format($value->package->price, 2, '.', '') }}
{{ $value->package->name }}
Price: {{config('app.covid_currency')}}{{ number_format($value->package->price, 2, '.', '') }}
Category: {{ $value->package->package_category->name }}
Qty: {{ $value->quantity }}
@php
if($value->quantity){
$totale_price += ($value->package->price * $value->quantity);
} else {
$totale_price += $value->package->price;
}
@endphp
@elseif($value->order)
{{config('app.covid_currency')}}{{ @($value->quantity) ? number_format($value->order->test_price * $value->quantity, 2, '.', '') : number_format($value->order->test_price, 2, '.', '') }}
{{ ($value->order->kittype == 'pcr') ? 'RT-PCR' : 'Rapid Antigen test' }}
Price: {{config('app.covid_currency')}}{{ $value->order->test_price }}
Qty: {{ $value->quantity }}
@php
if($value->quantity){
$totale_price += ($value->order->test_price * $value->quantity);
} else {
$totale_price += $value->order->test_price;
}
@endphp
@endif
@endforeach
@endif
Total{{config('app.covid_currency')}}{{ number_format($totale_price, 2, '.', '') }}