@extends('layouts.app') @section('title', 'Comparação de Contas') @section('header')

Comparação de Contas

Análise comparativa entre {{ $comparison->count() }} contas

@endsection @section('content')
@foreach($comparison as $index => $data)
@switch($data['account']->type) @case('checking') @break @case('savings') @break @case('credit_card') @break @case('investment') @break @endswitch
{{ $data['account']->name }}
{{ $data['account']->bank_name }}

R$ {{ number_format($data['balance'], 2, ',', '.') }}

Saldo Atual
R$ {{ number_format($data['total_credit'], 2, ',', '.') }}
Entradas
R$ {{ number_format($data['total_debit'], 2, ',', '.') }}
Saídas

{{ $data['transaction_count'] }} Transações
R$ {{ number_format($data['net_flow'], 2, ',', '.') }} Fluxo Líquido
R$ {{ number_format($data['avg_transaction'], 2, ',', '.') }} Média por Transação
@endforeach
Comparação Visual
Rankings
💰 Maior Saldo
@php $maxBalance = $comparison->sortByDesc('balance')->first(); @endphp
{{ $maxBalance['account']->name }}
R$ {{ number_format($maxBalance['balance'], 2, ',', '.') }}
📈 Mais Movimentada
@php $maxTransactions = $comparison->sortByDesc('transaction_count')->first(); @endphp
{{ $maxTransactions['account']->name }}
{{ $maxTransactions['transaction_count'] }} transações
📊 Melhor Fluxo
@php $maxFlow = $comparison->sortByDesc('net_flow')->first(); @endphp
{{ $maxFlow['account']->name }}
R$ {{ number_format($maxFlow['net_flow'], 2, ',', '.') }}
💸 Maior Média
@php $maxAvg = $comparison->sortByDesc('avg_transaction')->first(); @endphp
{{ $maxAvg['account']->name }}
R$ {{ number_format($maxAvg['avg_transaction'], 2, ',', '.') }}
Comparação Detalhada
@foreach($comparison as $data) @endforeach
Conta Tipo Saldo Atual Total Entradas Total Saídas Fluxo Líquido Transações Média/Transação Status
@switch($data['account']->type) @case('checking') @break @case('savings') @break @case('credit_card') @break @case('investment') @break @endswitch
{{ $data['account']->name }}
{{ $data['account']->bank_name }}
{{ $data['account']->type_name }} R$ {{ number_format($data['balance'], 2, ',', '.') }} R$ {{ number_format($data['total_credit'], 2, ',', '.') }} R$ {{ number_format($data['total_debit'], 2, ',', '.') }} R$ {{ number_format($data['net_flow'], 2, ',', '.') }} {{ $data['transaction_count'] }} R$ {{ number_format($data['avg_transaction'], 2, ',', '.') }} @if($data['account']->active) Ativa @else Inativa @endif
@endsection @push('scripts') @endpush