netgescon-day0/resources/views/admin/contabilita/index.blade.php

165 lines
10 KiB
PHP
Executable File

@extends('admin.layouts.app')
@section('title', '
{{ __(\'Dashboard Contabilità\') }}
')
@section('content')
<div class="py-5">
<div class="container-fluid mx-auto sm:px-4 lg:px-8">
<!-- Statistiche -->
<div class="grid row md:row gap-6 mb-8">
<div class="bg-white dark:bg-dark overflow-hidden shadow-sm rounded">
<div class="p-6">
<div class="d-flex align-items-center">
<div class="d-flex-shrink-0">
<div class="w-8 h-8 bg-primary rounded-full d-flex align-items-center justify-content-center">
<svg class="w-5 h-5 text-white" fill="currentColor" viewBox="0 0 20 20">
<path d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
</div>
</div>
<div class="ml-5 w-0 d-flex-1">
<dl>
<dt class="text-sm font-medium text-muted dark:text-gray-400 truncate">Movimenti Mese</dt>
<dd class="text-lg font-medium text-gray-900 dark:text-gray-100">{{ $stats['movimenti_mese'] }}</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="bg-white dark:bg-dark overflow-hidden shadow-sm rounded">
<div class="p-6">
<div class="d-flex align-items-center">
<div class="d-flex-shrink-0">
<div class="w-8 h-8 bg-success rounded-full d-flex align-items-center justify-content-center">
<svg class="w-5 h-5 text-white" fill="currentColor" viewBox="0 0 20 20">
<path d="M12 2l3.09 6.26L22 9l-5 4.87L18.18 22 12 18.27 5.82 22 7 13.87 2 9l6.91-.74L12 2z"></path>
</svg>
</div>
</div>
<div class="ml-5 w-0 d-flex-1">
<dl>
<dt class="text-sm font-medium text-muted dark:text-gray-400 truncate">Entrate Mese</dt>
<dd class="text-lg font-medium text-gray-900 dark:text-gray-100"> {{ number_format($stats['importo_entrate_mese'], 2, ',', '.') }}</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="bg-white dark:bg-dark overflow-hidden shadow-sm rounded">
<div class="p-6">
<div class="d-flex align-items-center">
<div class="d-flex-shrink-0">
<div class="w-8 h-8 bg-danger rounded-full d-flex align-items-center justify-content-center">
<svg class="w-5 h-5 text-white" fill="currentColor" viewBox="0 0 20 20">
<path d="M10 12a2 2 0 100-4 2 2 0 000 4z"></path>
<path fill-rule="evenodd" d="M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z" clip-rule="evenodd"></path>
</svg>
</div>
</div>
<div class="ml-5 w-0 d-flex-1">
<dl>
<dt class="text-sm font-medium text-muted dark:text-gray-400 truncate">Uscite Mese</dt>
<dd class="text-lg font-medium text-gray-900 dark:text-gray-100"> {{ number_format($stats['importo_uscite_mese'], 2, ',', '.') }}</dd>
</dl>
</div>
</div>
</div>
</div>
</div>
<!-- Azioni Rapide -->
<div class="bg-white dark:bg-dark overflow-hidden shadow-sm rounded mb-8">
<div class="p-6">
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-4">Azioni Rapide</h3>
<div class="grid row md:row lg:grid-cols-4 gap-4">
<a href="{{ route('admin.contabilita.registrazione') }}"
class="bg-primary text-white fw-bold py-3 px-3 rounded text-center transition duration-200">
Nuova Registrazione
</a>
<a href="{{ route('admin.contabilita.import-xml') }}"
class="bg-success hover:bg-green-700 text-white fw-bold py-3 px-3 rounded text-center transition duration-200">
Import XML
</a>
<a href="{{ route('admin.contabilita.movimenti') }}"
class="bg-indigo-500 hover:bg-indigo-700 text-white fw-bold py-3 px-3 rounded text-center transition duration-200">
Tutti i Movimenti
</a>
<a href="{{ route('admin.contabilita.riconciliazione') }}"
class="bg-purple-500 hover:bg-purple-700 text-white fw-bold py-3 px-3 rounded text-center transition duration-200">
Riconciliazione
</a>
</div>
</div>
</div>
<!-- Ultimi Movimenti -->
<div class="bg-white dark:bg-dark overflow-hidden shadow-sm rounded">
<div class="p-6">
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100 mb-4">Ultimi Movimenti</h3>
<div class="overflow-x-auto">
<table class="table bg-white dark:bg-dark border border-gray-200 ">
<thead class="bg-light dark:bg-gray-700">
<tr>
<th class="px-4 py-3 border-b border-gray-200 dark:border-gray-600 text-left text-xs font-medium text-muted dark:text-gray-300 uppercase tracking-wider">
Data
</th>
<th class="px-4 py-3 border-b border-gray-200 dark:border-gray-600 text-left text-xs font-medium text-muted dark:text-gray-300 uppercase tracking-wider">
Protocollo
</th>
<th class="px-4 py-3 border-b border-gray-200 dark:border-gray-600 text-left text-xs font-medium text-muted dark:text-gray-300 uppercase tracking-wider">
Descrizione
</th>
<th class="px-4 py-3 border-b border-gray-200 dark:border-gray-600 text-left text-xs font-medium text-muted dark:text-gray-300 uppercase tracking-wider">
Tipo
</th>
<th class="px-4 py-3 border-b border-gray-200 dark:border-gray-600 text-left text-xs font-medium text-muted dark:text-gray-300 uppercase tracking-wider">
Importo
</th>
</tr>
</thead>
<tbody class="bg-white dark:bg-dark table-bordered dark:divide-gray-700">
@forelse($ultimiMovimenti as $movimento)
<tr class="hover:bg-light dark:hover:bg-gray-700">
<td class="px-4 py-3 text-nowrap text-sm text-gray-900 dark:text-gray-100">
{{ $movimento->data_registrazione->format('d/m/Y') }}
</td>
<td class="px-4 py-3 text-nowrap text-sm font-medium text-gray-900 dark:text-gray-100">
{{ $movimento->protocollo }}
</td>
<td class="px-4 py-3 text-sm text-gray-900 dark:text-gray-100">
{{ $movimento->descrizione }}
</td>
<td class="px-4 py-3 text-nowrap text-sm text-gray-900 dark:text-gray-100">
<span class="inline-d-flex align-items-center px-2.5 py-0.5 rounded-full text-xs font-medium
{{ $movimento->tipo_movimento === 'entrata' ? 'bg-green-100 text-green-800 dark:bg-green-800 dark:text-green-100' : 'bg-red-100 text-red-800 dark:bg-red-800 dark:text-red-100' }}">
{{ ucfirst($movimento->tipo_movimento) }}
</span>
</td>
<td class="px-4 py-3 text-nowrap text-sm text-gray-900 dark:text-gray-100">
{{ number_format($movimento->importo_totale, 2, ',', '.') }}
</td>
</tr>
@empty
<tr>
<td colspan="5" class="px-4 py-3 text-center text-muted dark:text-gray-400">
Nessun movimento registrato
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
@endsection