@extends('layouts.app') @section('title', $bankAccount->name) @section('header')

{{ $bankAccount->name }}

{{ $bankAccount->bank_name }} - {{ ucfirst($bankAccount->type) }}

@endsection @section('header-actions')
Editar Voltar
@endsection @section('content')
Saldo Atual

R$ {{ number_format($bankAccount->balance, 2, ',', '.') }}

Total Créditos

R$ {{ number_format($stats['total_credit'], 2, ',', '.') }}

Total Débitos

R$ {{ number_format($stats['total_debit'], 2, ',', '.') }}

Transações

{{ $stats['reconciled_count'] + $stats['pending_count'] }}

{{ $stats['pending_count'] }} pendentes
Informações da Conta
@if($bankAccount->agency) @endif
Banco: {{ $bankAccount->bank_name }}
Conta: {{ $bankAccount->account_number }}
Agência: {{ $bankAccount->agency }}
Tipo: @switch($bankAccount->type) @case('checking') Conta Corrente @break @case('savings') Poupança @break @case('credit_card') Cartão de Crédito @break @default {{ ucfirst($bankAccount->type) }} @endswitch
Saldo Inicial: R$ {{ number_format($bankAccount->initial_balance, 2, ',', '.') }}
Criada em: {{ $bankAccount->created_at->format('d/m/Y H:i') }}
Última Atualização: {{ $bankAccount->updated_at->format('d/m/Y H:i') }}
Status: @if($bankAccount->status == 'active') Ativa @else Inativa @endif
@if($bankAccount->description)
Observações:

{{ $bankAccount->description }}

@endif
Transações Recentes
Ver Todas
@if($recentTransactions->count() > 0)
@foreach($recentTransactions as $transaction) @endforeach
Data Descrição Categoria Tipo Valor Status
{{ $transaction->transaction_date->format('d/m/Y') }}
{{ Str::limit($transaction->description, 30) }}
@if($transaction->reference) Ref: {{ $transaction->reference }} @endif
@if(isset($transaction->category) && is_object($transaction->category) && !empty($transaction->category->name)) {{ $transaction->category->name }} @else Não categorizada @endif @if($transaction->type == 'credit') Crédito @else Débito @endif {{ $transaction->type == 'credit' ? '+' : '-' }}R$ {{ number_format($transaction->amount, 2, ',', '.') }} @if($transaction->is_reconciled) Conciliada @else Pendente @endif
@if($recentTransactions->count() >= 10) @endif @else

Nenhuma transação encontrada para esta conta.

@endif
Resumo do Mês
{{ $monthlyStats['transactions_count'] ?? 0 }}
Transações este mês
R$ {{ number_format($monthlyStats['total_credit'] ?? 0, 2, ',', '.') }}
Créditos
R$ {{ number_format($monthlyStats['total_debit'] ?? 0, 2, ',', '.') }}
Débitos
@if(isset($topCategories) && $topCategories->count() > 0)
Categorias Mais Usadas
@foreach($topCategories as $category)
{{ $category->name }}
{{ $category->transactions_count }} transações
R$ {{ number_format($category->total_amount, 2, ',', '.') }}
@endforeach
@endif
@endsection @push('scripts') @endpush