@extends('layouts.admin') @section('title', 'Invoice '.$invoice->invoice_number) @section('content') @php $canManage = auth()->user()?->hasPermission('invoices', 'manage'); $canRecordPayment = auth()->user()?->hasPermission('invoices', 'payments'); @endphp

Invoice {{ $invoice->invoice_number }}

Billed to {{ $invoice->bill_to_name }} · {{ ucfirst($invoice->invoice_type) }} invoice

Print Download PDF @if($canRecordPayment) Record Payment @endif @if($canManage) Edit
@csrf @method('DELETE')
@endif
Bill To
{{ $invoice->bill_to_name }}
@if($invoice->invoice_type === 'company')
GST: {{ $invoice->company?->gst_number ?? '-' }}
{{ $invoice->company?->email ?? '-' }} · {{ $invoice->company?->phone ?? '-' }}
{{ $invoice->company?->billing_address ?? '-' }}
@else
{{ $invoice->customer?->email ?? '-' }} · {{ $invoice->customer?->mobile ?? '-' }}
@endif
Invoice Date
{{ $invoice->invoice_date->format('d M Y') }}
Due Date
{{ $invoice->due_date->format('d M Y') }}
@if($invoice->payment_terms)
Payment Terms
{{ $invoice->payment_terms }}
@endif
Invoice Items
@foreach($invoice->items as $item) @endforeach
Item Description Qty Unit Price Discount Tax % Total
{{ $item->item_name }} {{ $item->description }} {{ rtrim(rtrim(number_format((float) $item->quantity, 2), '0'), '.') ?: '0' }} ₹{{ number_format((float) $item->unit_price, 2) }} ₹{{ number_format((float) $item->discount, 2) }} {{ number_format((float) $item->tax, 2) }}% ₹{{ number_format((float) $item->total, 2) }}
@if($invoice->notes)
Notes
{{ $invoice->notes }}
@endif
Payments Received
@if($invoice->payments->isEmpty())

No payments recorded yet.

@else
@foreach($invoice->payments as $payment) @endforeach
Date Method Transaction ID Remarks Amount
{{ $payment->payment_date->format('d M Y') }} {{ ucfirst(str_replace('_', ' ', $payment->payment_method)) }} {{ $payment->transaction_id ?? '-' }} {{ $payment->remarks ?? '-' }} ₹{{ number_format((float) $payment->amount, 2) }}
@endif
Summary
Subtotal₹{{ number_format((float) $invoice->subtotal, 2) }}
Discount₹{{ number_format((float) $invoice->discount, 2) }}
Tax₹{{ number_format((float) $invoice->tax, 2) }}
Other Charges₹{{ number_format((float) $invoice->other_charges, 2) }}
Grand Total₹{{ number_format((float) $invoice->grand_total, 2) }}
Paid₹{{ number_format((float) $invoice->total_paid, 2) }}
Balance Due₹{{ number_format($invoice->balance_due, 2) }}
Status
Payment Status
{{ ucfirst($invoice->payment_status) }}
Payment Method
{{ $invoice->payment_method ? ucfirst(str_replace('_', ' ', $invoice->payment_method)) : 'Not specified' }}
Created By
{{ $invoice->createdBy?->name ?? '-' }}
@endsection