@extends('layouts.app')
@section('title','Payments • JAN Enterprises ERP')
@section('page_title','Payments & Receivables')
@section('page_subtitle','Invoice balances, partial payments, receipts and overdue collections')
@section('content')
Open Invoices{{ $invoices->whereNotIn('status',['paid','cancelled'])->count() }}
Total Outstanding₹{{ number_format($invoices->sum(fn($i)=>$i->balance),0) }}
Payments Recorded{{ $payments->count() }}
Collected₹{{ number_format($payments->sum('amount'),0) }}
Outstanding Invoices
Record payments from the invoice screen| Invoice | Company | Total | Paid | Balance | Due Date | Status | |
@forelse($invoices->filter(fn($i)=>$i->balance>0) as $invoice)@php $overdue=$invoice->due_date && $invoice->due_date->isPast(); @endphp| {{ $invoice->invoice_no }} | {{ $invoice->order->company->name }} | ₹{{ number_format((float)$invoice->total_amount,0) }} | ₹{{ number_format($invoice->paid_amount,0) }} | ₹{{ number_format($invoice->balance,0) }} | {{ $invoice->due_date?->format('d M Y') ?? '—' }} | {{ $overdue?'Overdue':ucfirst($invoice->status) }} | Record Payment |
@empty| No outstanding invoices. |
@endforelse
Payment History
Latest 100 receipts| Receipt | Date | Company | Invoice | Method | Reference | Amount |
@forelse($payments as $p)| {{ $p->receipt_no }} | {{ $p->payment_date->format('d M Y') }} | {{ $p->company->name }} | {{ $p->invoice?->invoice_no ?? '—' }} | {{ $p->method ?: '—' }} | {{ $p->reference ?: '—' }} | ₹{{ number_format((float)$p->amount,2) }} |
@empty| No payments recorded yet. |
@endforelse
@endsection