@extends('reports.client-statement.base') @section('action-content')

Client Statement

{{-- FILTER FORM --}}
@csrf

{{-- REPORT --}} @if(!empty($report)) {{-- HEADER --}}
Client: {{ $client->surname }} {{ $client->first_name }} ({{ $client->account_number }})
Period: {{ \Carbon\Carbon::parse($from)->format('d M Y') }} - {{ \Carbon\Carbon::parse($to)->format('d M Y') }}
{{-- PDF EXPORT --}}
@csrf
{{-- ACCOUNTS --}} @foreach($report as $section)
Account Type: {{ strtoupper($section['account']->account_type) }}

Opening Balance: {{ number_format($section['openingBalance'], 2) }}

@forelse($section['transactions'] as $t) @empty @endforelse
Date Type Reference Payment Method Debit Credit Balance
{{ \Carbon\Carbon::parse($t['date'])->format('d-m-Y') }} {{ $t['type'] }} {{ $t['ref'] }} {{ $t['payment_method'] }} {{ $t['debit'] > 0 ? number_format($t['debit'], 2) : '-' }} {{ $t['credit'] > 0 ? number_format($t['credit'], 2) : '-' }} {{ number_format($t['balance'], 2) }}
No transactions in this period

Closing Balance: {{ number_format($section['closingBalance'], 2) }}


@endforeach @endif
@endsection