@php $s = $settings; $acc = $s->accent_color ?? '#c9a96e'; $dec = (int)($invoice->currency_decimals ?? 2); $sym = $invoice->currency_symbol ?? 'โ‚น'; $pos = $invoice->currency_symbol_position ?? 'before'; $fmt = fn($n) => $pos === 'after' ? number_format((float)$n, $dec, '.', ',') . ' ' . $sym : $sym . number_format((float)$n, $dec, '.', ','); $labels = $invoice->fee_labels ?? []; $isMs = $invoice->type === 'milestone'; @endphp {{ $invoice->typeLabel() }} โ€” {{ $invoice->invoice_number }}
{{-- โ”€โ”€ Header โ”€โ”€ --}}
@if($s->company_logo) @endif
{{ $s->company_name ?: config('app.name') }}
@if($s->company_address)
{{ $s->company_address }}{{ $s->company_city ? ', '.$s->company_city : '' }}{{ $s->company_state ? ', '.$s->company_state : '' }}
@endif @if($s->company_tax_number)
{{ $s->tax_number_label }}: {{ $s->company_tax_number }}
@endif @if($s->company_rera)
RERA: {{ $s->company_rera }}
@endif @if($s->company_pan)
PAN: {{ $s->company_pan }}
@endif
{{ $invoice->typeLabel() }}
#{{ $invoice->invoice_number }}
Issued: {{ $invoice->issued_at->format('d M Y') }}
@if($invoice->status === 'issued') ISSUED @elseif($invoice->status === 'cancelled') CANCELLED @endif
{{-- โ”€โ”€ Body โ”€โ”€ --}}
{{-- Client + Unit --}}
Bill To
{{ $invoice->client_name }}
@if($invoice->client_phone)
๐Ÿ“ฑ {{ $invoice->client_phone }}
@endif @if($invoice->client_email)
โœ‰ {{ $invoice->client_email }}
@endif @if($invoice->client_address)
{{ $invoice->client_address }}
@endif
Unit Details
Unit {{ $invoice->plot_number }}
{{ $invoice->plot_type ?? '' }}{{ $invoice->area ? ' ยท '.$invoice->area.' '.($invoice->area_unit ?? '') : '' }}
@if($invoice->project_name)
{{ $invoice->project_name }}{{ $invoice->block_name ? ' โ€” '.$invoice->block_name : '' }}
@endif @if($invoice->payment_plan_name)
Plan: {{ $invoice->payment_plan_name }}
@endif
Booking #{{ $invoice->booking_id }}
{{-- โ”€โ”€ Charges Breakdown โ”€โ”€ --}}
Charges Breakdown
@foreach([ ['processing_fee', $labels['processing'] ?? 'Processing Fee'], ['stamp_duty', $labels['stamp_duty'] ?? 'Stamp Duty'], ['registration_fee', $labels['registration'] ?? 'Registration Fee'], ['maintenance_charge', $labels['maintenance'] ?? 'Maintenance Charge'], ['custom_fee1', $labels['custom1'] ?? 'Custom Fee 1'], ['custom_fee2', $labels['custom2'] ?? 'Custom Fee 2'], ] as [$field, $label]) @if($invoice->$field > 0) @endif @endforeach @if($invoice->tax_amount > 0) @endif
Description Amount
Unit Price โ€” {{ $invoice->plot_number }}
{{ $invoice->plot_type ?? '' }}{{ $invoice->area ? ' ยท '.$invoice->area.' '.($invoice->area_unit ?? '') : '' }}
{{ $fmt($invoice->unit_price) }}
{{ $label }} {{ $fmt($invoice->$field) }}
Subtotal {{ $fmt($invoice->subtotal) }}
{{ $labels['tax'] ?? ($invoice->tax_label ?? 'Tax') }} @if($invoice->tax_rate > 0)({{ $invoice->tax_rate }}%)@endif {{ $fmt($invoice->tax_amount) }}
Grand Total {{ $fmt($invoice->total_amount) }}
{{-- โ”€โ”€ Payment Summary โ”€โ”€ --}}
{{ $isMs ? 'This Payment' : 'Amount Paid' }}
{{ $fmt($invoice->amount_paid) }}
@if($isMs && $invoice->meta['milestone_label'] ?? null)
{{ $invoice->meta['milestone_label'] }}
@endif
Balance Due
{{ $invoice->balance_due > 0 ? $fmt($invoice->balance_due) : 'โœ“ Nil' }}
Payment Mode
{{ str_replace('_', ' ', $invoice->payment_mode ?? 'โ€”') }}
{{-- โ”€โ”€ Milestone Schedule โ”€โ”€ --}} @if(!empty($invoice->milestones_snapshot))
Payment Schedule
@foreach($invoice->milestones_snapshot as $i => $m) @php $isCurrent = !empty($m['is_current']); $sc = match($m['status']) { 'paid' => '#16a34a', 'overdue' => '#dc2626', default => '#ca8a04' }; $rowBg = $isCurrent ? 'background:#fffdf8;font-weight:700;' : ''; @endphp @endforeach
# Milestone Amount Status Date
{{ $i + 1 }} {{ $m['label'] }} @if($isCurrent) This Payment @endif @if($pos === 'after') {{ number_format((float)$m['display_amount'], $dec, '.', ',') }} {{ $sym }} @else {{ $sym }}{{ number_format((float)$m['display_amount'], $dec, '.', ',') }} @endif {{ $m['status'] }} {{ $m['paid_at'] ?? $m['due_date'] ?? 'โ€”' }}
@endif {{-- Bank Details --}} @if($s->bank_details)
Bank Details
{{ $s->bank_details }}
@endif {{-- Terms --}} @if($s->terms_conditions)
Terms & Conditions
{{ $s->terms_conditions }}
@endif {{-- Footer Note --}} @if($s->invoice_footer_note)
{{ $s->invoice_footer_note }}
@endif
{{-- Bottom bar --}}
{{ $s->company_name ?: config('app.name') }} @if($s->company_phone) ยท {{ $s->company_phone }} @endif @if($s->company_email) ยท {{ $s->company_email }} @endif
Invoice #{{ $invoice->invoice_number }} ยท {{ $invoice->issued_at->format('d M Y') }}