@extends('customers.layout') @section('customers.content')
ID: {{ $customer->id }}
Name: {{ $customer->name ?: '-' }}
Contact: {{ $customer->contact ?: '-' }}
Alt Contact: {{ $customer->alt_contact ?: '-' }}
Account Balance: UGX {{ number_format($customer->balance) }}
Suspense Balance: UGX {{ number_format($customer->suspense_account_balance) }}
Created At: {{ $customer->created_at->format('d/m/Y H:i') }}
Last Updated: {{ $customer->updated_at->format('d/m/Y H:i') }}
@foreach($customer->collections as $collection) @endforeach
Date Branch Reason Amount Actions
{{ date('d-M-Y',strtotime($collection->date)) }} {{ $collection->branch?->name ?? '-' }} {{ $collection->reason }} UGX {{ number_format($collection->amount) }} @if($collection->summary?->status == "Open" || auth()->user()->can('edit collections'))
@if($collection->summary?->status == "Open" || auth()->user()->can('delete collections'))
@csrf @method('DELETE')
@endif
@endif
@foreach($customer->credits as $credit) @endforeach
Date Branch Receipt No Amount Actions
{{ date('d-M-Y',strtotime($credit->date)) }} {{ $credit->branch?->name ?? '-' }} {{ $credit->receipt_no }} UGX {{ number_format($credit->amount) }} @if($credit->summary?->status == "Open" || auth()->user()->can('edit credits')) @endif
Payment History
@can('create payments') New Payment @endcan
@foreach($customer->payments as $payment) @endforeach
Date Amount Balance After Actions
{{ date('d M Y',strtotime($payment->date)) }} UGX {{ number_format($payment->amount) }} UGX {{ number_format($payment->balance) }} @can('edit payments') @endcan
@foreach($customer?->suspenseTransactions as $transaction) @endforeach
Date Type Amount Linked Transaction Actions
{{ date('d-M-Y',strtotime($transaction->created_at)) }} {{ ucfirst($transaction->type) }} UGX {{ number_format($transaction->amount) }} @if($transaction->transactionable) {{ class_basename($transaction->transactionable) }} #{{ $transaction->transactionable->id }} @else - @endif
@section('customjs') @endsection @endsection