@extends('garage.layouts.app') @section('title', 'Payments Received') @section('content')
@if($status || $paymentMethod || $fromDate || $toDate || $search) Clear @endif
@forelse($payments as $payment) @empty @endforelse
Payment No Date Customer Invoice Amount Method Status Actions
{{ $payment->payment_number }} {{ \Carbon\Carbon::parse($payment->payment_date)->format('M d, Y') }}
{{ $payment->customer_name ?? '-' }}
@if($payment->invoice_number) {{ $payment->invoice_number }} @else - @endif PKR {{ number_format($payment->amount, 2) }} {{ ucfirst(str_replace('_', ' ', $payment->payment_method)) }} @php $statusColors = [ 'draft' => 'secondary', 'posted' => 'success', 'cancelled' => 'danger' ]; $statusColor = $statusColors[$payment->status] ?? 'secondary'; @endphp {{ ucfirst($payment->status) }}
@if($payment->status === 'draft') @endif @if($payment->status !== 'posted')
@csrf @method('DELETE')
@endif
No payments found
@if($payments->hasPages())
{{ $payments->links() }}
@endif
@endsection