@foreach ($purchase_details as $key => $details) @php // Calculate rowspan dynamically $rowspan = 1; // The main row if ($details->product_note) { $rowspan++; // Add one row for product note } if ($details->spasification_details->count() > 0) { $rowspan++; // Add one row for specification details } @endphp @if ($details->product_note) @endif @if ($details->spasification_details->count() > 0) @endif @endforeach
Sl Code Product Quanity Unit Price Amount Discount Vat/Tax Net Amount
% Amount % Amount
{{ $key + 1 }} {{ $details->product_code }} {{ $details->product_name }} {{ numberformat($details->qty - $details->return_qty) }} {{ $details->unit_name }} {{ numberformat($details->unit_price) }} {{ numberformat($details->amount) }} {{ $details->discount_percent }} {{ numberformat($details->discount_amount) }} {{ $details->vat_percent }} {{ numberformat($details->vat_amount) }} {{ numberformat($details->nettotal) }}
Product Note: {{ $details->product_note }}
@foreach ($details->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