{{-- Encode the image to Base64 to bypass DomPDF path rendering issues --}} @php $imagePath = public_path('images/white-logo.png'); $imageData = file_exists($imagePath) ? base64_encode(file_get_contents($imagePath)) : ''; @endphp
{{-- Dynamic Logo --}} @if($imageData) Logo @else

Meking Buildtec

@endif
Meking Buildtec India Pvt Ltd
Ground Floor, plot no-40, kh no-731
New Delhi 110037
E: info@mekingbuildtec.in | P: +91 99999 00000
GSTIN: 07AABCD1234E1Z5 | State: Delhi (07)
@if($invoice_type === 'proforma_invoice') PROFORMA INVOICE @else TAX INVOICE @endif
{{-- Proforma Legal Disclaimer --}} @if($invoice_type === 'proforma_invoice')
THIS IS AN ESTIMATE, NOT A TAX INVOICE
@else
ORIGINAL FOR RECIPIENT
@endif
BILLED TO (CLIENT)
{{ $client_name }}
{{ $client_email }}
Project: {{ $project_name }}
Invoice No: {{ $invoice_number }}
Invoice Date: {{ $date }}
DESCRIPTION OF SERVICE
{{-- NEW: Loop through the array of items --}} @foreach($items as $index => $item) @endforeach
# DESCRIPTION WEIGHT (MT) RATE (₹) AMOUNT (₹)
{{ $index + 1 }} {{ $item['description'] }} {{ number_format($item['quantity'], 2) }} {{ number_format($item['rate'], 2) }} {{ number_format($item['subtotal'], 2) }}
{{-- NEW: Dynamically pull GST rate from the first item --}}
Total Taxable Value ₹{{ number_format($subtotal, 2) }}
IGST / Tax @ {{ $items[0]['gst_rate'] ?? 18 }}% ₹{{ number_format($gst_amount, 2) }}
Grand Total ₹{{ number_format($grand_total, 2) }}