@if ($type == 'I')

{{ $companyName }}

{{ $companyAddress }},
Mail -{{$email}}
@elseif($type == 'Q')

{{ $companyName ?? ''}}

Products Quotation
Contact No: {{ $contact_no ?? ''}},
@else

{{ $companyName ?? ''}}

Products Order's
Contact No: {{ $contact_no ?? ''}},
@endif
@if ($type == 'I') @endif
GST No - {{ $gst_no ?? '' }}
Contact No: {{ $contact_no ?? ''}}
To:{{ $clientName }}
Address: {{ $clientAddress }}
@if($type == 'I') Payment Terms: {{ $payment_terms }}
Bill No:{{ $invoiceNumber }}
Date: {{ $invoiceDate }} @endif Quote No:{{ $invoiceNumber }}
Quote Date: {{ $invoiceDate }}
@php $subtotal = 0; $pageSubtotal = 0; $pageCount = 0; $totalGST = 0; $gstRate = 0; @endphp @foreach ($products as $index => $product) @php $total = $product['quantity'] * $product['unit_price']; $gstAmount = 0; $currentGstRate = $product['gst'] ?? 0; if ($type == 'I' && $gst != 'N') { $gstAmount = ($total * $currentGstRate) / 100; $totalGST += $gstAmount; $gstRate = $currentGstRate; // Store the last GST rate (assuming uniform rates) } $totalWithGst = $total + $gstAmount; $subtotal += $total; $pageSubtotal += $total; @endphp @if (($index + 1) % ($settings->inv_desc_flag == 'A' ? 15 : 18) == 0)
S.No Description HSN Code Qty Rate Total
{{ $index + 1 }}
{{ $product['name'] ?? '' }}
@if($settings->inv_desc_flag == 'A' && !empty($product['description']))
({{ $product['description'] }})
@endif
{{ $product['code'] }} {{ $product['quantity']}} ₹ {{ number_format($product['unit_price'], 2) }} ₹ {{ number_format($total, 2) }}

...Continue

{{ $companyName }}

{{ $companyAddress }},
Mail -{{$email}}
GST No - {{ $gst_no ?? '' }}
Contact No: {{ $invoiceNumber ?? ''}}
To:{{ $clientName }}
Address: {{ $clientAddress }}
Payment Terms: {{ $invoiceDate }}
Bill No:{{ $invoiceNumber }}
Date: {{ $invoiceDate }}
@php $pageSubtotal = 0; $pageCount++; @endphp @endif @endforeach
S.No Description HSN Code Qty Rate Total