{{-- TOOLBAR --}} @php $pillMap=['paid'=>'pill-paid','partially_paid'=>'pill-partial','overdue'=>'pill-overdue','submitted'=>'pill-submitted','draft'=>'pill-draft','cancelled'=>'pill-cancelled']; $sym = $company->currency_symbol ?? 'เงณ'; $cur = $company->currency ?? 'BDT'; @endphp
Invoice Preview {{ $invoice->number }} {{ ucfirst(str_replace('_',' ',$invoice->status)) }}
๐Ÿšš Challan
{{-- STAMP --}} @if($invoice->status==='paid')
PAID
@elseif($invoice->status==='cancelled')
CANCELLED
@elseif($invoice->status==='draft')
DRAFT
@elseif($invoice->due_date&&$invoice->due_date->isPast()&&$invoice->outstanding>0)
OVERDUE
@endif {{-- HEADER --}}
@if($company->logo) @endif
{{ $company->name }}
@if($company->address){{ $company->address }}
@endif @if($company->phone)๐Ÿ“ž {{ $company->phone }}@if($company->email)  ยท  โœ‰ {{ $company->email }}@endif
@endif @if($company->tax_id)BIN / TIN: {{ $company->tax_id }}@endif @if($company->registration_number)  |  Reg No: {{ $company->registration_number }}@endif
Invoice
{{ $invoice->number }}
{{-- META STRIP --}}
Invoice Date
{{ $invoice->date->format('d M Y') }}
Due Date
{{ $invoice->due_date?$invoice->due_date->format('d M Y'):'On Receipt' }}
@if($invoice->salesOrder)
Sales Order
{{ $invoice->salesOrder->number }}
@endif
Status
{{ ucfirst(str_replace('_',' ',$invoice->status)) }}
Currency
{{ $cur }} ({{ $sym }})
{{-- BODY --}}
{{-- PARTIES --}}
Bill To
{{ $invoice->customer->name }}
@if($invoice->customer->contact_person)
Attn: {{ $invoice->customer->contact_person }}
@endif @if($invoice->customer->address)
{{ $invoice->customer->address }}
@endif @if($invoice->customer->phone)
๐Ÿ“ž {{ $invoice->customer->phone }}
@endif @if($invoice->customer->email)
โœ‰ {{ $invoice->customer->email }}
@endif @if($invoice->customer->tax_id)
BIN / TIN: {{ $invoice->customer->tax_id }}
@endif
Ship To
@if($invoice->salesOrder && $invoice->salesOrder->delivery_address)
{{ $invoice->customer->name }}
{{ $invoice->salesOrder->delivery_address }}
@else
{{ $invoice->customer->name }}
{{ $invoice->customer->address ?? '(Same as billing address)' }}
@endif
{{-- ITEMS TABLE --}} @foreach($invoice->items as $i => $line) @endforeach
# Item / Description Qty Unit Unit Price Disc% VAT% Amount ({{ $cur }})
{{ $i+1 }}
{{ $line->item->name }}
@if($line->description)
{{ $line->description }}
@endif
{{ number_format($line->qty,2) }} {{ $line->unit }} {{ $sym }}{{ number_format($line->rate,2) }} {{ $line->discount_percent > 0 ? $line->discount_percent.'%' : 'โ€”' }} {{ $line->tax_rate > 0 ? $line->tax_rate.'%' : 'โ€”' }} {{ $sym }}{{ number_format($line->amount,2) }}
{{-- BOTTOM: WORDS + TOTALS --}}
Amount in Words
{{ $cur }} {{ number_format($invoice->total,2) }}
@if($invoice->notes)
Note: {{ $invoice->notes }}
@endif
Subtotal{{ $sym }}{{ number_format($invoice->subtotal,2) }}
@if($invoice->discount_amount > 0)
Discount-{{ $sym }}{{ number_format($invoice->discount_amount,2) }}
@endif @if($invoice->tax_amount > 0)
VAT / Tax{{ $sym }}{{ number_format($invoice->tax_amount,2) }}
@endif
Total{{ $sym }}{{ number_format($invoice->total,2) }}
@if($invoice->paid_amount > 0)
โœ“ Paid{{ $sym }}{{ number_format($invoice->paid_amount,2) }}
@if($invoice->outstanding > 0)
Balance Due{{ $sym }}{{ number_format($invoice->outstanding,2) }}
@endif @endif
{{-- BANK + TERMS --}}
Payment / Bank Details
Bank Name{{ $company->bank_name ?? 'โ€”' }} Account Name{{ $company->name }} Account No.{{ $company->bank_account ?? 'โ€”' }} Branch{{ $company->bank_branch ?? 'โ€”' }} Routing No.{{ $company->bank_routing ?? 'โ€”' }} bKash / Nagad{{ $company->mobile_banking ?? 'โ€”' }}
Terms & Conditions
@if($invoice->terms) {{ $invoice->terms }} @else 1. Payment due within {{ $invoice->customer->credit_days ?? 30 }} days of invoice date.
2. Late payments may attract interest @ 2% per month.
3. Goods remain property of {{ $company->name }} until full payment.
4. All disputes subject to Bangladesh jurisdiction. @endif
{{-- .body --}} {{-- SIGNATURES --}}
Prepared By
{{ $invoice->createdBy->name ?? '' }}
Authorized Signatory
{{ $company->name }}
Received By (Customer)
Name & Stamp
{{-- FOOTER --}}
{{ $company->name }} ยท {{ $company->address ?? '' }} Page 1 of 1 ยท Printed {{ now()->format('d M Y H:i') }}