@extends('admin.layouts.app') @section('title', 'Unpaid Customers Report') @push('styles') @endpush @section('content')

Unpaid Customer Report

@forelse ($rows as $row) @php $pkgAmount = (float) (($row->InvoiceAmt ?? 0) > 0 ? $row->InvoiceAmt : ($row->PkgAmount ?? 0)); $paidAmount = (float) (($row->InvoiceAmt ?? 0) > 0 ? ($row->LedgerPaidAmt ?? 0) : ($row->PaidAmount ?? 0)); $balance = (float) ($row->Balance ?? 0); $validity = ! empty($row->Validity) ? date('d-M-Y', strtotime($row->Validity)) : 'N/A'; $isExpired = ! empty($row->Validity) && $row->Validity < $today; @endphp @empty @endforelse
Name Phone Package Amount (₹) Paid Amount (₹) Balance (₹) Payment Status Package Expiry Address Action
{{ $row->Fname }} {{ $row->Lname }} {{ $row->Phone }} {{ number_format($pkgAmount, 2) }} {{ number_format($paidAmount, 2) }} {{ number_format($balance, 2) }} @if ($paidAmount > 0) Partial @else Unpaid @endif @if ($isExpired) {{ $validity }} @else {{ $validity }} @endif {{ $row->Address }} @if (\Illuminate\Support\Facades\Route::has('admin.payments.create')) Receive @else Receive @endif @if (\Illuminate\Support\Facades\Route::has('admin.customers.edit')) View @else View @endif
No unpaid customers found.
@endsection @push('scripts') @endpush