@extends('layouts.master') @section('title', 'Client Statement') @section('styles') @endsection @section('content') @php $companyDetails = $company ?? \App\Models\CompanySettings::query()->first(); $selectedCurrency = null; if (!empty($currency)) { $selectedCurrency = ($currencies ?? collect())->firstWhere('currency_id', $currency); } $currencySymbol = $selectedCurrency->symbol ?? '$'; @endphp
@if(!empty($companyDetails?->address)) {{ $companyDetails->address }} @else {{ $companyDetails?->company_code ?? 'Law Firm Information' }} @endif @if(!empty($companyDetails?->contact_phone)) | {{ $companyDetails->contact_phone }} @endif @if(!empty($companyDetails?->contact_email)) | {{ $companyDetails->contact_email }} @endif
{{ $selectedClient->email ?? 'N/A' }} {{ $selectedClient->phone_primary ?? 'N/A' }}
{{ trim(implode(', ', array_filter([ $selectedClient->street_address ?? null, $selectedClient->city ?? null, $selectedClient->state_province ?? null, $selectedClient->country ?? null, ]))) ?: '—' }}
| Date | Type | Description / Matter | Reference | Amount ({{ $currencySymbol }}) | Status |
|---|---|---|---|---|---|
| {{ !empty($txn['date']) ? \Carbon\Carbon::parse($txn['date'])->format('Y-m-d') : '' }} | {{ $type === 'receipt' ? 'Receipt' : 'Invoice' }} | {{ $txn['description'] ?? '' }} | {{ $txn['reference'] ?? '' }} | {{ $signed < 0 ? '-' : '' }}{{ $currencySymbol }}{{ number_format(abs($signed), 2) }} | {{ $type === 'receipt' ? 'Received' : ($txn['status'] ?? 'N/A') }} |
| No transactions for the selected period. Adjust date range or generate report. | |||||
| Net period activity | {{ $fmtSigned($netPeriod) }} | ||||
| Opening balance (carried) | {{ $fmtSigned($opening) }} | ||||
| Closing balance | {{ $fmtSigned($closing) }} | ||||
Please choose a client and generate the statement.