@extends('layouts.app') @section('title', 'Invoice ' . $invoice->invoice_number) @section('page-title', $invoice->invoice_number) @section('content')
{{-- Main Invoice Preview --}}
{{-- Actions bar --}}
← Back Download PDF Preview PDF @if(!in_array($invoice->status, ['paid','cancelled'])) Edit @endif @if($invoice->customer_email)
@csrf
@endif Duplicate @if(!in_array($invoice->status, ['cancelled']))
@csrf
@endif
{{-- Invoice card --}}
{{-- Header --}}
@if($profile->logo) @endif

{{ $profile->business_name }}

{{ $profile->full_address }}

@if($profile->gstin)

GSTIN: {{ $profile->gstin }}

@endif

{{ strtoupper(str_replace('_',' ',$invoice->invoice_type)) }}

{{ $invoice->invoice_number }}

Date: {{ $invoice->invoice_date->format('d M Y') }}

@if($invoice->due_date)

Due: {{ $invoice->due_date->format('d M Y') }}

@endif {{ ucfirst($invoice->payment_status) }}
{{-- Bill To --}}

Bill To

{{ $invoice->customer_name }}

@if($invoice->billing_address)

{{ $invoice->billing_address }}

@endif @if($invoice->customer_gstin)

GSTIN: {{ $invoice->customer_gstin }}

@endif @if($invoice->customer_phone)

{{ $invoice->customer_phone }}

@endif @if($invoice->customer_email)

{{ $invoice->customer_email }}

@endif

Invoice Details

FY:{{ $invoice->financial_year }}
Supply:{{ ucwords(str_replace('_',' ',$invoice->supply_type)) }}
Place of Supply:{{ config('erp.states.'.$invoice->place_of_supply, $invoice->place_of_supply) }}
Rev. Charge:{{ $invoice->reverse_charge }}
{{-- Items --}}
@if($invoice->isInterState()) @else @endif @foreach($invoice->items as $item) @if($invoice->isInterState()) @else @endif @endforeach
# Item HSN/SAC Qty Rate Disc TaxableIGSTCGST SGSTTotal
{{ $item->serial_number }}

{{ $item->item_name }}

@if($item->description)

{{ $item->description }}

@endif
{{ $item->hsn_sac_code ?: '—' }} {{ $item->quantity }} {{ $item->unit }} ₹{{ number_format($item->unit_price, 2) }} {{ $item->discount_percent > 0 ? $item->discount_percent.'%' : '—' }} ₹{{ number_format($item->taxable_amount, 2) }}{{ $item->igst_rate }}%
₹{{ number_format($item->igst_amount, 2) }}
{{ $item->cgst_rate }}%
₹{{ number_format($item->cgst_amount, 2) }}
{{ $item->sgst_rate }}%
₹{{ number_format($item->sgst_amount, 2) }}
₹{{ number_format($item->total_amount, 2) }}
{{-- Totals --}}
Subtotal₹{{ number_format($invoice->subtotal, 2) }}
@if($invoice->discount_amount > 0)
Discount-₹{{ number_format($invoice->discount_amount, 2) }}
@endif
Taxable Amount₹{{ number_format($invoice->taxable_amount, 2) }}
@if($invoice->cgst_amount > 0)
CGST₹{{ number_format($invoice->cgst_amount, 2) }}
SGST₹{{ number_format($invoice->sgst_amount, 2) }}
@endif @if($invoice->igst_amount > 0)
IGST₹{{ number_format($invoice->igst_amount, 2) }}
@endif @if(abs($invoice->round_off) > 0)
Round Off₹{{ number_format($invoice->round_off, 2) }}
@endif
Total₹{{ number_format($invoice->total_amount, 2) }}
@if($invoice->amount_paid > 0)
Paid₹{{ number_format($invoice->amount_paid, 2) }}
Balance Due₹{{ number_format($invoice->amount_due, 2) }}
@endif

{{ $invoice->amount_in_words }}

@if($invoice->notes || $invoice->terms_conditions)
@if($invoice->notes)

Notes

{{ $invoice->notes }}

@endif @if($invoice->terms_conditions)

Terms & Conditions

{{ $invoice->terms_conditions }}

@endif
@endif
{{-- Payment History --}} @if($invoice->payments->count() > 0)

Payment History

@foreach($invoice->payments as $pmt) @endforeach
Date Amount Mode Reference Notes
{{ $pmt->payment_date->format('d M Y') }} ₹{{ number_format($pmt->amount, 2) }} {{ str_replace('_', ' ', $pmt->payment_mode) }} {{ $pmt->reference_number ?: '—' }} {{ $pmt->notes ?: '—' }}
@endif
{{-- Sidebar: Record Payment --}} @if($invoice->amount_due > 0 && $invoice->status !== 'cancelled')

Record Payment

@csrf
@endif
@endsection