@extends('tellers.drawers.base') @section('action-content')
@if(session('success')) @endif @if(session('error')) @endif
{{-- LEFT COLUMN — Drawer Status --}}

Drawer Status

@if($drawer)

Date: {{ $drawer->date }}

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

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

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

Status: {{ ucfirst($drawer->status) }}

@else

No open drawer found. Open one using the form on the right.

@endif
@if($drawer)

Today's 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 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 ?? '')) }} {{ 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 ?? '')) }} -{{ number_format($wd->amount, 2) }} {{ $wd->reference }}
No transactions yet.
@endif {{-- RIGHT COLUMN — Open / Close Drawer --}}
{{-- OPEN DRAWER --}}

Open Drawer

@csrf
{{-- CLOSE DRAWER --}}

Close Drawer

@csrf

Closing the drawer will calculate closing balance, based on today's activities.

@endsection