@extends('admin.layout') @section('title', 'Payment Details') @section('header', 'Payment Details') @section('content')

Payment #PAY-{{ str_pad($payment->id, 4, '0', STR_PAD_LEFT) }}

Recorded on {{ $payment->created_at->format('F d, Y \a\t g:i A') }}

{{ ucfirst($payment->status) }} Payment

{{ $payment->status === 'paid' ? 'Payment successfully processed' : ($payment->status === 'pending' ? 'Payment awaiting processing' : 'Payment processing failed') }}

Payment Information

Amount

{{ $payment->getFormattedAmount() }}

Customer Name

{{ $payment->customer_name ?? 'N/A' }}

Payment Method

{{ ucfirst(str_replace('_', ' ', $payment->payment_method)) }}

Payment Date

{{ $payment->payment_date->format('F d, Y') }}

@if($payment->transaction_id)

Transaction ID

{{ $payment->transaction_id }}

@endif @if($payment->upi_id)

UPI ID

{{ $payment->upi_id }}

@endif @if($payment->upi_transaction_id)

UPI Transaction ID

{{ $payment->upi_transaction_id }}

@endif @if($payment->check_number)

Check Number

{{ $payment->check_number }}

@endif @if($payment->bank_name)

Bank Name

{{ $payment->bank_name }}

@endif

Task Information

Task Title

{{ $payment->task->title }}

Task ID

#{{ $payment->task->id }}

Technician

{{ $payment->technician->name }}

{{ $payment->technician->phone }}

Task Completed

{{ $payment->task->completed_at->format('F d, Y') }}

Processing Information

Processed By

{{ $payment->processedBy->name ?? 'System' }}

{{ $payment->processedBy->email ?? 'N/A' }}

Processed At

{{ $payment->processed_at?->format('F d, Y g:i A') ?? 'N/A' }}

@if($payment->notes)

{{ $payment->payment_method === 'debt' ? 'Debt Notes' : 'Payment Notes' }}

{{ nl2br($payment->notes) }}

@if($payment->payment_method === 'debt')
Debt Payment

This payment is recorded as debt/credit and requires follow-up for collection.

@endif
@endif
@endsection