@foreach ($details as $key => $detail) @php // Calculate rowspan dynamically $rowspan = 1; // The main row if ($detail->product_note) { $rowspan++; // Add one row for product note } if ($detail->spasification_details->count() > 0) { $rowspan++; // Add one row for specification details } @endphp @if ($detail->product_note) @endif @if ($detail->spasification_details->count() > 0) @endif @endforeach
Sl Code Product Quanity Unit Price Amount Vat/Tax Net Amount
% Amount
{{ $key + 1 }} {{ $detail->product_code }} {{ $detail->product_name }} {{ numberformat($detail->qty) }} {{ $detail->unit_name }} {{ numberformat($detail->unit_price) }} {{ numberformat($detail->amount) }} {{ $detail->vat_percent }} {{ numberformat($detail->vat_amount) }} {{ numberformat($detail->nettotal) }}
Product Note: {{ $detail->product_note }}
@foreach ($detail->spasification_details as $i => $spasification_details) ({{ intToRoman($i + 1) }}). @if ($spasification_details->emi_number) EMI Number: {{ $spasification_details->emi_number }}, @endif @if ($spasification_details->serial_number) Serial Number: {{ $spasification_details->serial_number }} @endif
@endforeach