@extends('layouts.app') @section('title', __('accounting-reports::lang.bank_reconciliation')) @section('content')

@lang('accounting-reports::lang.bank_reconciliation')

@component('components.widget', ['class' => 'box-primary'])

@lang('accounting-reports::lang.bank_reconciliation_description')


@if(isset($bankAccounts) && $bankAccounts->count() > 0) @foreach($bankAccounts as $bankAccount)

{{ $bankAccount->account_name ?? '-' }}

@lang('accounting-reports::lang.bank_name'): {{ $bankAccount->bank_name ?? '-' }}

@lang('accounting-reports::lang.account_number'): {{ $bankAccount->account_number ?? '-' }}

@php $summary = $accountsSummary[$bankAccount->id] ?? []; @endphp
@lang('accounting-reports::lang.unreconciled_transactions') {{ $summary['total_unreconciled'] ?? 0 }}
@lang('accounting-reports::lang.unreconciled_amount') {{ $summary['unreconciled_amount'] ?? 0 }}
@if(isset($summary['last_reconciled_date']) && $summary['last_reconciled_date'])

@lang('accounting-reports::lang.last_reconciled'): @try {{ @format_date($summary['last_reconciled_date']) }} @catch(\Exception $e) {{ $summary['last_reconciled_date'] }} @endtry

@else

@lang('accounting-reports::lang.never_reconciled')

@endif
@endforeach @else
@lang('accounting-reports::lang.no_bank_accounts_found')
@endif
@endcomponent
@endsection @section('javascript') @endsection