@if($order->orderItems->count())
| # |
Item |
Type |
Qty |
Unit Price |
Subtotal |
@php $total = 0; @endphp
@foreach($order->orderItems as $k => $item)
@php
$lineTotal = (float) ($item->line_total ?? ((float) $item->unit_price * (int) $item->quantity));
$total += $lineTotal;
$typeLabel = $item->item_type === 'addon' ? 'Add On' : 'Compulsory';
@endphp
| {{ $k + 1 }} |
{{ $item->name }} |
{{ $typeLabel }} |
{{ $item->quantity }} |
₹{{ number_format((float) $item->unit_price, 2) }} |
₹{{ number_format($lineTotal, 2) }} |
@endforeach
| Total |
₹{{ number_format($total, 2) }} |
@else
No items found for this order.
@endif