@extends('layouts.app') @section('title', 'Payment') @section('content')
Manage customer payments and outstanding balances.
Total Payments
Paid Payments
Pending Payments
Total Amount Received
| # | Invoice No. | Customer Name | Payment Date | Payment Method | Amount Paid | Remaining Balance | Payment Status | Received By | Actions |
|---|---|---|---|---|---|---|---|---|---|
| {{ $payment->payment_id }} | {{-- Invoice --}}@if($payment->order) {{ $payment->order->serial_number ?? 'N/A' }} @else N/A @endif | {{-- Customer --}}{{ $payment->customer->customer_name ?? 'N/A' }} | {{-- Payment Date --}}{{ $payment->payment_date ? $payment->payment_date->format('d-M-Y h:i A') : 'N/A' }} | {{-- Payment Method --}}{{ $payment->method->method_type ?? 'N/A' }} | {{-- Amount --}}Rs. {{ number_format((float)$payment->amount_paid, 2) }} | {{-- Remaining --}}Rs. {{ number_format((float)$payment->remaining_amount, 2) }} | {{-- Status --}}
@php
$status = strtolower(
$payment->status->status_name ?? ''
);
@endphp
@if($status === 'paid')
Paid
@elseif($status === 'partial')
Partial
@elseif($status === 'pending')
Pending
@else
{{ $payment->status->status_name ?? 'Unknown' }}
@endif
|
{{-- Received By --}}
{{ $payment->receiver->user_name ?? 'N/A' }} | {{-- Actions --}}|