@php use App\Support\IndianCurrency; $company=$invoice->order->company; $paid=$invoice->paid_amount; $balance=$invoice->balance; @endphp {{ $invoice->invoice_no }} @if(empty($pdfMode))
@endif
@if($logoData)JAN@endif

{{ $settings['business_name'] ?? 'JAN Enterprises' }}

{{ $settings['business_address'] ?? 'Configure business address in ERP Settings' }}
@if(!empty($settings['gstin']))GSTIN: {{ $settings['gstin'] }}
@endif{{ $settings['phone'] ?? '' }} @if(!empty($settings['email']))• {{ $settings['email'] }}@endif

TAX INVOICE

{{ $invoice->invoice_no }}
Date: {{ $invoice->invoice_date->format('d M Y') }}
Due: {{ $invoice->due_date?->format('d M Y') ?? 'As per terms' }}
Order: {{ $invoice->order->order_no }}

Bill To

{{ $company->legal_name ?: $company->name }}
{{ $company->billing_address ?: 'Billing address not added' }}
@if($company->gstin)GSTIN: {{ $company->gstin }}
@endif@if($company->state){{ $company->state }} @if($company->state_code)(Code {{ $company->state_code }})@endif
@endif{{ $company->contact_person }} @if($company->phone)• {{ $company->phone }}@endif

Supply Details

PO / Ref: {{ $invoice->order->po_reference ?: '—' }}
Place of Supply: {{ $invoice->place_of_supply ?: '—' }}
Payment Terms: {{ $invoice->order->payment_terms }}
Tax: {{ number_format((float)$invoice->tax_rate,2) }}% {{ $invoice->tax_mode==='intra'?'CGST + SGST':'IGST' }}
@foreach($invoice->items as $i=>$item)@endforeach
#DescriptionHSNQtyRateAmount
{{ $i+1 }}{{ $item->description }}{{ $item->hsn }}{{ rtrim(rtrim(number_format((float)$item->quantity,2,'.',''),'0'),'.') }}₹{{ number_format((float)$item->rate,2) }}₹{{ number_format((float)$item->amount,2) }}
Taxable Value₹{{ number_format((float)$invoice->taxable_amount,2) }}
@if($invoice->tax_mode==='intra')
CGST₹{{ number_format((float)$invoice->cgst_amount,2) }}
SGST₹{{ number_format((float)$invoice->sgst_amount,2) }}
@else
IGST₹{{ number_format((float)$invoice->igst_amount,2) }}
@endif@if((float)$invoice->round_off!=0)
Round Off₹{{ number_format((float)$invoice->round_off,2) }}
@endif
Grand Total₹{{ number_format((float)$invoice->total_amount,2) }}
Amount in words: {{ IndianCurrency::words((float)$invoice->total_amount) }}
@if($paid>0)
Payment Status: Received ₹{{ number_format($paid,2) }} • Balance ₹{{ number_format($balance,2) }}
@endif