@if(($pdfSettings['show_logo'] ?? true) && !empty($companyLogo))
@endif
{{ $companyName ?: config('app.name') }}
@if($companyAddress){{ $companyAddress }}
@endif @if($companyPhone)Phone: {{ $companyPhone }}
@endif @if($companyEmail)Email: {{ $companyEmail }}
@endif @if(($pdfSettings['show_gst'] ?? true) && $companyGst)GSTIN: {{ $companyGst }}@endif
PURCHASE BILL
{{ $bill->bill_number }}
Date: {{ $bill->bill_date->format('d M Y') }}
{{ $bill->status }} {{ str_replace('_', ' ', $bill->payment_status) }}
Due Date
{{ $bill->due_date?->format('d M Y') ?? '-' }}
Vendor Invoice #
{{ $bill->vendor_invoice_no ?? '-' }}
Invoice Date
{{ $bill->vendor_invoice_date?->format('d M Y') ?? '-' }}
Reference
@if($bill->purchaseOrder)PO: {{ $bill->purchaseOrder->po_number }}@elseif($bill->grn)GRN: {{ $bill->grn->grn_number }}@else - @endif
Vendor Details
{{ $bill->vendor->name ?? '-' }}
@if($bill->vendor) @if($bill->vendor->billing_address)
{{ $bill->vendor->billing_address }}
@endif @if($bill->vendor->billing_city || $bill->vendor->billing_state)
{{ $bill->vendor->billing_city }}{{ $bill->vendor->billing_city && $bill->vendor->billing_state ? ', ' : '' }}{{ $bill->vendor->billing_state }} {{ $bill->vendor->billing_pincode }}
@endif @if($bill->vendor->phone)
Phone: {{ $bill->vendor->phone }}
@endif @if($bill->vendor->email)
Email: {{ $bill->vendor->email }}
@endif @if($bill->vendor->gst_number)
GSTIN: {{ $bill->vendor->gst_number }}
@endif @endif
Bill To (Our Company)
{{ $companyName }}
@if($companyAddress)
{{ $companyAddress }}
@endif @if($companyPhone)
Phone: {{ $companyPhone }}
@endif @if($companyEmail)
Email: {{ $companyEmail }}
@endif @if($companyGst)
GSTIN: {{ $companyGst }}
@endif
@if($hasTax1)@endif @if($hasTax2)@endif @foreach($bill->items as $i => $item) @php $inclusiveValue = ($item->qty * $item->rate) - ($item->discount_amount ?? 0); $taxPercent = ($item->tax_1_rate ?? 0) + ($item->tax_2_rate ?? 0); $taxableValue = $taxPercent > 0 ? ($inclusiveValue / (1 + $taxPercent / 100)) : $inclusiveValue; @endphp @if($hasTax1)@endif @if($hasTax2)@endif @endforeach @if($hasTax1)@endif @if($hasTax2)@endif
# Item Description HSN Qty Rate Taxable Amt{{ $tax1Name }}{{ $tax2Name }}Total
{{ $i + 1 }} {{ $item->product->name ?? $item->description ?? 'N/A' }} @if($item->variation)
{{ $item->variation->variation_name ?: $item->variation->sku }}@endif @if($item->product && $item->product->sku)
SKU: {{ $item->product->sku }}@endif @if(($item->discount_percent ?? 0) > 0)
Discount: {{ $item->discount_percent }}%@endif
{{ $item->product->hsn_code ?? '-' }} {{ number_format($item->qty, 2) }} ₹{{ number_format($item->rate, 2) }} ₹{{ number_format($taxableValue, 2) }}{{ $item->tax_1_amount ? '₹' . number_format($item->tax_1_amount, 2) : '-' }}{{ $item->tax_2_amount ? '₹' . number_format($item->tax_2_amount, 2) : '-' }}₹{{ number_format($item->total, 2) }}
TOTAL {{ number_format($bill->items->sum('qty'), 2) }} ₹{{ number_format($totalTaxableValue, 2) }}₹{{ number_format($tax1Total, 2) }}₹{{ number_format($tax2Total, 2) }}₹{{ number_format($totalAmount, 2) }}
Amount in Words:
{{ $amountInWords }}
@if($vendorBank)
Vendor Bank Details
{{ $vendorBank->account_holder_name ?? $bill->vendor->name }}
Bank: {{ $vendorBank->bank_name }}
A/C No: {{ $vendorBank->account_number }}
@if($vendorBank->ifsc_code)IFSC: {{ $vendorBank->ifsc_code }}
@endif @if($vendorBank->upi_id)UPI: {{ $vendorBank->upi_id }}@endif
@endif @if(($pdfSettings['show_notes'] ?? true) && $bill->notes)
Notes
{!! nl2br(e($bill->notes)) !!}
@endif
@if($hasTax1 && $tax1Total > 0) @endif @if($hasTax2 && $tax2Total > 0) @endif @if($bill->shipping_charge > 0) @endif @if($bill->adjustment != 0) @endif @if($bill->balance_due > 0) @else @endif
Subtotal ₹{{ number_format($totalTaxableValue, 2) }}
{{ $tax1Name }} ₹{{ number_format($tax1Total, 2) }}
{{ $tax2Name }} ₹{{ number_format($tax2Total, 2) }}
Shipping Charges ₹{{ number_format($bill->shipping_charge, 2) }}
Round Off (+/-) ₹{{ number_format($bill->adjustment, 2) }}
Grand Total ₹{{ number_format($bill->grand_total, 2) }}
Balance Due ₹{{ number_format($bill->balance_due, 2) }}
@if($pdfSettings['show_signature'] ?? true)
Vendor Signature
{{ $bill->vendor->name ?? '' }}
Authorized Signatory
{{ $companyName }}
@endif