@if($isSuperAdmin)
@if($payment->billing)
{{ $payment->billing->client->company->name ?? 'N/A' }}
@else
{{ $payment->client->company->name ?? 'N/A' }}
@endif
@endif
{{ $payment->client->name ?? 'N/A' }}
{{ $isSuperAdmin ? '₱' : $company->currency_code }} {{ number_format($payment->amount, 2) }}
@php
$typeColors = [
'billing' => 'primary',
'installation' => 'success',
'reconnection' => 'warning',
'late_fee' => 'danger',
'deposit' => 'info',
'other' => 'secondary'
];
$typeLabels = [
'billing' => 'Billing',
'installation' => 'Installation',
'reconnection' => 'Reconnection',
'late_fee' => 'Late Fee',
'deposit' => 'Deposit',
'other' => 'Other'
];
$paymentType = $payment->payment_type ?? 'billing';
$color = $typeColors[$paymentType] ?? 'secondary';
$label = $typeLabels[$paymentType] ?? ucfirst($paymentType);
@endphp
{{ $label }}
{{ ucfirst($payment->payment_method) }}
{{ $payment->reference_number ?? 'N/A' }}
{{ $payment->payment_date->format('M d, Y') }}
{{ ucfirst($payment->status) }}
@if($payment->status !== 'voided')
@endif
{{-- Void acts on the whole billing behind this payment, so it
reverses every payment collected against that bill. --}}
@if($payment->billing && $payment->billing->isVoidable())
@can('void', $payment->billing)
@endcan
@endif
@endforeach