@php use App\Support\MoneyFormat; $cur = (string) $invoice->currency; $money = fn ($minor) => MoneyFormat::display((int) $minor, $cur); $isTax = $invoice->doc_type === 'tax_invoice'; $title = match ($invoice->doc_type) { 'tax_invoice' => 'Tax Invoice', 'proforma' => 'Proforma Invoice', 'credit_note' => 'Credit Note', default => 'Receipt', }; $seller = is_array($invoice->seller_snapshot_json) ? $invoice->seller_snapshot_json : []; $brand = $settings->brand_color ?: '#0B3D2E'; $issued = $invoice->issued_at ? \Illuminate\Support\Carbon::parse($invoice->issued_at)->timezone(safe_timezone(config('app.timezone'), 'Asia/Calcutta'))->format('d M Y') : ''; @endphp
|
@if ($logoData)
@endif {{ $seller['name'] ?? brand_name() }}
@if (!empty($seller['address'])){!! nl2br(e($seller['address'])) !!} @endif
@if (!empty($seller['tax_id'])){{ $settings->tax_label ?: 'Tax ID' }}: {{ $seller['tax_id'] }} @endif
@if (!empty($seller['reg_no'])){{ __('Reg. No') }}: {{ $seller['reg_no'] }} @endif
@foreach (($seller['extra'] ?? []) as $ex){{ $ex['label'] }}: {{ $ex['value'] }} @endforeach
@if (!empty($seller['phone'])){{ $seller['phone'] }} @endif
@if (!empty($seller['email'])){{ $seller['email'] }} @endif
|
{{ $title }}{{ $invoice->invoice_number }}
Date: {{ $issued }}
{{ ucfirst($invoice->status) }}
|
|
Bill to
{{ $invoice->buyer_name ?: 'Customer' }}
@if ($invoice->buyer_phone){{ $invoice->buyer_phone }} @endif
@if ($invoice->buyer_email){{ $invoice->buyer_email }} @endif
@if (!empty($invoice->billing_json['address'])){!! nl2br(e($invoice->billing_json['address'])) !!} @endif
|
@if ($invoice->external_order_number) Order: {{ $invoice->external_order_number }} @endif
|
| Description | @if ($isTax)HSN/SAC | @endifQty | Unit | @if ($isTax)Tax % | @endifAmount |
|---|---|---|---|---|---|
| {{ $it->description }}@if($it->sku) {{ $it->sku }}@endif |
@if ($isTax){{ $it->hsn_sac ?: '—' }} | @endif{{ rtrim(rtrim((string) $it->qty, '0'), '.') }} | {{ $money($it->unit_price_minor) }} | @if ($isTax){{ $it->tax_rate !== null ? rtrim(rtrim((string) $it->tax_rate, '0'), '.').'%' : '—' }} | @endif{{ $money($it->line_subtotal_minor) }} |
| Subtotal | {{ $money($invoice->subtotal_minor) }} |
| Discount | -{{ $money($invoice->discount_minor) }} |
| Shipping | {{ $money($invoice->shipping_minor) }} |
| {{ $t->tax_label }}{{ $t->rate !== null ? ' ('.rtrim(rtrim((string) $t->rate, '0'), '.').'%)' : '' }} | {{ $money($t->amount_minor) }} |
| Total | {{ $money($invoice->total_minor) }} |
|
{{ $seller['signature_label'] ?? 'Authorised signatory' }}
|