@if ($carts->count() > 0) @php $grandtotal = 0; @endphp @foreach ($carts as $cart) @php $total = $cart->quantity * $cart->product->sellprice; $grandtotal += $total; @endphp @endforeach
SN Code Unit Qnty Rate Total
{{ $loop->iteration }} {{ $cart->product->pid }} {{ $cart->product->unit->name }} @if ($cart->quantity > 1) @else @endif {{ $cart->quantity }} {{ bdnumber($cart->product->sellprice) }}{{ bdnumber($total) }}
GRAND TOTAL {{ bdnumber($grandtotal) }}
@endif @if ($carts->count() == 0)
No item in cart
@endif