@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
@if ($isTax)@endif @if ($isTax)@endif @foreach ($invoice->items as $it) @if ($isTax)@endif @if ($isTax)@endif @endforeach
DescriptionHSN/SACQty UnitTax %Amount
{{ $it->description }}@if($it->sku)
{{ $it->sku }}@endif
{{ $it->hsn_sac ?: '—' }}{{ rtrim(rtrim((string) $it->qty, '0'), '.') }} {{ $money($it->unit_price_minor) }}{{ $it->tax_rate !== null ? rtrim(rtrim((string) $it->tax_rate, '0'), '.').'%' : '—' }}{{ $money($it->line_subtotal_minor) }}
@if ($invoice->discount_minor > 0)@endif @if ($invoice->shipping_minor > 0)@endif @if ($isTax) @foreach ($invoice->taxSummary as $t) @endforeach @endif
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) }}
@if (!empty($sigData))

{{ $seller['signature_label'] ?? 'Authorised signatory' }}
@endif
@if ($isTax)
{{ $invoice->tax_inclusive ? 'Prices are tax inclusive.' : 'Tax exclusive.' }}
@endif @if ($settings->footer_note)
{{ $settings->footer_note }}
@endif @if ($invoice->buyer_email || $settings->support_email)
For queries: {{ $settings->support_email ?: $invoice->buyer_email }}
@endif
{{ $invoice->public_token }}