netgescon-day0/resources/views/filament/pages/contabilita/conto-mastrino.blade.php

60 lines
3.3 KiB
PHP

<x-filament-panels::page>
<div class="mx-auto max-w-7xl space-y-4">
<x-filament.components.page-breadcrumbs
:breadcrumbs="[
['label' => 'Contabilità', 'url' => null],
['label' => 'Prima nota', 'url' => \App\Filament\Pages\Contabilita\PrimaNotaArchivio::getUrl(panel: 'admin-filament')],
['label' => 'Mastrino conto', 'url' => null],
]"
/>
<x-filament::section>
<div class="grid gap-4 md:grid-cols-3">
<div class="rounded-md border border-gray-200 px-3 py-2 text-sm dark:border-gray-800">
<div class="text-gray-500">Totale Dare</div>
<div class="font-semibold"> {{ number_format($totaleDare, 2, ',', '.') }}</div>
</div>
<div class="rounded-md border border-gray-200 px-3 py-2 text-sm dark:border-gray-800">
<div class="text-gray-500">Totale Avere</div>
<div class="font-semibold"> {{ number_format($totaleAvere, 2, ',', '.') }}</div>
</div>
<div class="rounded-md border border-gray-200 px-3 py-2 text-sm dark:border-gray-800">
<div class="text-gray-500">Saldo finale</div>
<div class="font-semibold"> {{ number_format($saldoFinale, 2, ',', '.') }}</div>
</div>
</div>
</x-filament::section>
<x-filament::section>
<div class="overflow-hidden rounded-lg border border-gray-200 dark:border-gray-800">
<table class="min-w-full divide-y divide-gray-200 text-sm dark:divide-gray-800">
<thead class="bg-gray-50 text-left text-xs font-semibold text-gray-600 dark:bg-gray-900 dark:text-gray-300">
<tr>
<th class="px-3 py-2">Data</th>
<th class="px-3 py-2">Descrizione</th>
<th class="px-3 py-2 text-right">Dare</th>
<th class="px-3 py-2 text-right">Avere</th>
<th class="px-3 py-2 text-right">Saldo</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-100 dark:divide-gray-800">
@forelse($righe as $r)
<tr>
<td class="px-3 py-2">{{ $r['data'] }}</td>
<td class="px-3 py-2">{{ $r['descrizione'] }}</td>
<td class="px-3 py-2 text-right">{{ $r['dare'] > 0 ? ('€ ' . number_format($r['dare'], 2, ',', '.')) : '—' }}</td>
<td class="px-3 py-2 text-right">{{ $r['avere'] > 0 ? ('€ ' . number_format($r['avere'], 2, ',', '.')) : '—' }}</td>
<td class="px-3 py-2 text-right"> {{ number_format($r['saldo'], 2, ',', '.') }}</td>
</tr>
@empty
<tr>
<td colspan="5" class="px-3 py-4 text-center text-gray-500">Nessun movimento per questo conto.</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</x-filament::section>
</div>
</x-filament-panels::page>