@extends('layouts.app') @section('title', 'Deposit — '.$account->customer?->display_name) @section('content')

{{ $account->customer?->display_name ?: 'Deposit account' }}

{{ $account->customer?->customer_number }} · opened {{ $account->created_at?->format('d M Y') }}

Customer All deposits @if ((float) $account->balance <= 0)
@csrf @method('DELETE')
@endif
@include('components.kpi', ['label' => 'Held now', 'value' => money($account->balance), 'variant' => (float) $account->balance > 0 ? 'warn' : '']) @include('components.kpi', ['label' => 'Total deposited', 'value' => money($account->total_deposited), 'variant' => 'info']) @include('components.kpi', ['label' => 'Total refunded', 'value' => money($account->total_refunded), 'variant' => 'good'])

Take a deposit

@csrf
@error('amount'){{ $message }}@enderror

Refund

@csrf
At most {{ money($account->balance) }} is held. @error('amount'){{ $message }}@enderror

Movements

@if ($account->transactions->isEmpty()) @include('components.empty-state', [ 'icon' => '💳', 'title' => 'No movements yet', 'message' => 'Deposits and refunds will be listed here in order.', ]) @else @foreach ($account->transactions as $tx) @endforeach
WhenTypeDescription AmountBy
{{ $tx->created_at?->format('d M Y H:i') }} {{ title_case_words($tx->type) }} {{ $tx->description ?: '—' }} {{ $tx->type === 'deposit' ? '+' : '−' }}{{ money($tx->amount) }} {{ $tx->user?->name ?: '—' }}
@endif
@endsection