@extends('layouts.finance') @section('title', 'Saving Amount') @section('subtitle', 'Money set aside alongside salary payments') @section('content') @php $dateFilter = $dateFilter ?? ['active' => false, 'from' => null, 'to' => null, 'label' => null]; $dashboardRouteParams = ($dateFilter['active'] ?? false) ? ['from' => $dateFilter['from'], 'to' => $dateFilter['to']] : []; $entryCount = $savingAccounts->sum(fn ($account) => $account->entries->count()); @endphp
{{-- Totals, one per currency: savings are held in the currency they were paid in. --}}One row per bank and account number. Saving into the same bank and last four digits tops up that row.
| Bank | Account | Currency | Deposits | Saved | Last Saved |
|---|---|---|---|---|---|
| {{ $account->bank_name }} | •••• {{ $account->last_four }} | {{ $account->currency }} | {{ $account->entries->count() }} | {{ $metrics->money($account->balance, $account->currency) }} | {{ optional($account->entries->first()?->entry_date)->format('d M Y') ?: '—' }} |
| Nothing saved yet. Add a saving amount on a salary debit to start one. | |||||
| Date | Saving Account | From Account | Employee | Amount |
|---|---|---|---|---|
| {{ $entry->entry_date?->format('d M Y') }} | {{ $account->bank_name }} •••• {{ $account->last_four }} | {{ $entry->bankAccount?->name ?: '—' }} | {{ $entry->employee?->name ?: '—' }} | {{ $metrics->money($entry->amount, $entry->currency) }} |