@extends('layouts.omd.omd') @section('title', 'Payments') @section('content')
Payments
@if(session('success'))
✓ {{ session('success') }}
@endif @if(session('error'))
✕ {{ session('error') }}
@endif
@forelse($payments as $payment) @php $statusMap = [ 'pending' => ['bg' => 'warning', 'text' => 'dark'], 'partial' => ['bg' => 'info', 'text' => 'white'], 'paid' => ['bg' => 'success', 'text' => 'white'], ]; $s = $statusMap[$payment->payment_status] ?? ['bg' => 'secondary', 'text' => 'white']; @endphp {{-- Add Payment Modal --}} @if($payment->payment_status !== 'paid') @endif @empty @endforelse
PO Number Vendor Total Paid Pending Method Transaction ID Status Payment Date Action
{{ $payment->order->po_number ?? '-' }} {{ $payment->vendor->user->name ?? '-' }} ₹ {{ number_format($payment->total_amount, 2) }} ₹ {{ number_format($payment->paid_amount, 2) }} ₹ {{ number_format($payment->pending_amount, 2) }} {{ ucfirst(str_replace('_', ' ', $payment->payment_method ?? '-')) }} {{ $payment->transaction_id ?? '-' }} {{ ucfirst($payment->payment_status) }} {{ $payment->payment_date ? \Carbon\Carbon::parse($payment->payment_date)->format('d M Y') : '-' }} @if($payment->payment_status !== 'paid') @else Fully Paid ✓ @endif
No payments found
@endsection