@extends('layouts.app') @section('title', 'Bank Reconciliation — Command Centre') @push('styles') @endpush @section('content') @php $user = Auth::user(); $currency_code = $user->base_currency ?? 'USD'; $sym = ['USD'=>'$','EUR'=>'€','GBP'=>'£','OMR'=>'ر.ع.','AED'=>'د.إ','SAR'=>'ر.س','PKR'=>'₨','INR'=>'₹','KWD'=>'د.ك','QAR'=>'ر.ق']; $cs = $sym[$currency_code] ?? $currency_code; $fmt = fn($n) => $cs . number_format(abs((float)$n), 2); $TX_TYPES = [ 'income' => ['label' => 'Income', 'class' => 't-income', 'cat' => 'income'], 'expense' => ['label' => 'Expense', 'class' => 't-expense', 'cat' => 'expense'], 'transfer' => ['label' => 'Transfer', 'class' => 't-transfer', 'cat' => null], 'investment' => ['label' => 'Investment', 'class' => 't-investment', 'cat' => 'expense'], 'loan_disbursement' => ['label' => 'Loan Received', 'class' => 't-loan_disbursement', 'cat' => 'income'], 'loan_repayment' => ['label' => 'Loan Payment', 'class' => 't-loan_repayment', 'cat' => 'expense'], 'credit_card_payment' => ['label' => 'CC Payment', 'class' => 't-credit_card_payment', 'cat' => 'expense'], 'refund' => ['label' => 'Refund', 'class' => 't-refund', 'cat' => 'income'], 'payment' => ['label' => 'Payment', 'class' => 't-payment', 'cat' => 'expense'], ]; $amtClass = fn($type) => match(true) { in_array($type, ['income','refund','loan_disbursement']) => 'amt-inc', in_array($type, ['transfer']) => 'amt-xfer', in_array($type, ['investment']) => 'amt-inv', in_array($type, ['loan_repayment','loan_disbursement']) => 'amt-loan', default => 'amt-exp', }; @endphp
No transactions to reconcile
Upload a bank statement above to begin, or check the selected account and month.
| Date | Description | Category | Tx Type | Amount | Status | Statement Match | Actions | |
|---|---|---|---|---|---|---|---|---|
| @if($is_stmt) @endif | {{-- Date --}}
@if($dateObj)
{{ $dateObj->format('d') }}
{{ $dateObj->format('M') }}
@else
{{ $disp_date }}
@endif
|
{{-- Description --}}
@if($is_stmt)
@else
{{ $disp_desc }}
@endif
@if($src_sheet && $src_sheet !== 'CSV')
📄 {{ $src_sheet }}
@endif
@if($is_matched && !empty($item['stmt_desc']))
↔ {{ Str::limit($item['stmt_desc'], 40) }}
@endif
|
{{-- Category --}}
@if($is_stmt)
@foreach($incomeCategories as $cat)
{{ $cat->name }}Income
@endforeach
@foreach($expenseCategories as $cat)
{{ $cat->name }}Expense
@endforeach
|
{{-- Transaction Type --}}
@if($is_stmt) @else {{ $typeInfo['label'] }} @endif | {{-- Amount --}}@if($is_stmt) @else {{ $fmt($disp_amt) }} @endif | {{-- Status --}}@if($item['type'] === 'matched') ✓ Exact @elseif($item['type'] === 'near_match') ≈ Near @elseif($is_sys) ⚠ Sys Only @else 📄 Stmt @endif | {{-- Statement Match Info --}}
@if(isset($item['stmt_amount']) && $item['stmt_amount'] > 0)
{{ $fmt($item['stmt_amount']) }}
@if(isset($item['stmt_date']) && $item['stmt_date'] !== ($item['transaction_date'] ?? ''))
{{ $item['stmt_date'] }}
@endif
@else
—
@endif
|
{{-- Actions --}}
@if($is_matched || $item['type'] === 'near_match')
@elseif($is_sys)
@else
@endif
|