@extends('tellers.drawers.base') @section('action-content')
{{-- PAGE TITLE --}}

Teller Drawer Details

{{-- SUMMARY --}}

Teller: {{ $drawer->user->name }}

Date: {{ \Carbon\Carbon::parse($drawer->date)->format('d M Y') }}

Status: {{ strtoupper($drawer->status) }} @if($drawer->forced_close) FORCE CLOSED @endif

@if($drawer->closed_at)

Closed At: {{ $drawer->closed_at->format('d M Y H:i') }}

@endif @if($drawer->closedBy)

Closed By: {{ $drawer->closedBy->name }}

@endif
{{-- BALANCES --}}

Opening Balance: ₵ {{ number_format($drawer->opening_balance, 2) }}

Total Deposits: ₵ {{ number_format($drawer->total_deposits, 2) }}

Total Withdrawals: ₵ {{ number_format($drawer->total_withdrawals, 2) }}


Closing Balance: ₵ {{ number_format($drawer->closing_balance, 2) }}

{{-- FORCE CLOSE AUDIT --}} @if($drawer->forced_close)
Force Close Reason:
{{ $drawer->force_close_reason }}
@endif {{-- ADMIN FORCE CLOSE ACTION --}} @can('force-close-drawer') @if($drawer->status === 'open')

Admin Action

@csrf
@endif @endcan {{-- TRANSACTIONS --}}

Drawer Transactions

@php $i = 1; @endphp {{-- DEPOSITS --}} @foreach($drawer->deposits as $dep) @endforeach {{-- WITHDRAWALS --}} @foreach($drawer->withdrawals as $wd) @endforeach @if($drawer->deposits->count() == 0 && $drawer->withdrawals->count() == 0) @endif
# Time Type Client Account Type Amount (₵) Reference
{{ $i++ }} {{ $dep->created_at->format('H:i') }} Deposit {{ $dep->clientAccount->client->surname ?? '' }} {{ $dep->clientAccount->client->first_name ?? '' }} {{ strtoupper(str_replace('_',' ', $dep->clientAccount->account_type ?? 'N/A')) }} {{ number_format($dep->amount, 2) }} {{ $dep->reference_no }}
{{ $i++ }} {{ $wd->created_at->format('H:i') }} Withdrawal {{ $wd->clientAccount->client->surname ?? '' }} {{ $wd->clientAccount->client->first_name ?? '' }} {{ strtoupper(str_replace('_',' ', $wd->clientAccount->account_type ?? 'N/A')) }} -{{ number_format($wd->amount, 2) }} {{ $wd->reference }}
No transactions recorded for this drawer.
@endsection