@extends('layouts.app') @section('title', 'Dashboard de Contabilidad') @section('content')

Dashboard de Contabilidad

Visión general y gestión del módulo contable

Plan de Cuentas
{{ number_format($stats['total_accounts'] ?? 0) }}
Períodos Activos
{{ number_format($stats['total_periods'] ?? 0) }}
Asientos Contables
{{ number_format($stats['posted_entries'] ?? 0) }}
Estados Financieros
{{ number_format(\App\Models\FinancialStatement::count() ?? 0) }}
Resumen Contable
Período Actual
@if($stats['current_period']) {{ $stats['current_period']->name }} @else No definido @endif
Total de Cuentas
{{ number_format($stats['total_accounts'] ?? 0) }}
{{ number_format($stats['active_accounts'] ?? 0) }} activas
Asientos Pendientes
{{ number_format($stats['pending_entries'] ?? 0) }}
Último Asiento
@php $lastEntry = \App\Models\JournalEntry::latest()->first(); @endphp @if($lastEntry) {{ $lastEntry->entry_number }} @else N/A @endif
@if(isset($account_types) && $account_types->count() > 0)
Distribución de Tipos de Cuentas
Asientos por Estado
@endif @if(isset($entries_by_month) && $entries_by_month->count() > 0)
Evolución de Asientos Contables (Últimos 6 Meses)
@endif @if(isset($recent_entries) && $recent_entries->count() > 0)
Asientos Recientes
@foreach($recent_entries as $entry) @endforeach
N° Asiento Período Fecha Referencia Descripción Total Estado Creado por
{{ $entry->entry_number }} {{ $entry->period->name ?? 'N/A' }} {{ $entry->entry_date ? $entry->entry_date->format('d/m/Y') : 'N/A' }} {{ Str::limit($entry->reference, 30) }}
{{ Str::limit($entry->description, 50) }}
${{ number_format($entry->total_debit ?? 0, 2) }} @php $statusConfig = [ 'draft' => ['class' => 'warning', 'icon' => 'edit', 'label' => 'Borrador'], 'posted' => ['class' => 'success', 'icon' => 'check-circle', 'label' => 'Registrado'], 'cancelled' => ['class' => 'danger', 'icon' => 'times-circle', 'label' => 'Cancelado'] ]; $status = $statusConfig[$entry->status] ?? ['class' => 'secondary', 'icon' => 'circle', 'label' => ucfirst($entry->status)]; @endphp {{ $status['label'] }} {{ $entry->createdBy->name ?? 'N/A' }}
@endif
@push('styles') @endpush @push('scripts') @endpush @endsection