@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
| 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) }} |
| # | 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'] ?? 'โ' }} |