63 lines
3.5 KiB
PHP
Executable File
63 lines
3.5 KiB
PHP
Executable File
<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' => 'Modifica registrazione', 'url' => null],
|
|
]"
|
|
/>
|
|
|
|
<div class="grid grid-cols-1 gap-4 lg:grid-cols-12">
|
|
<div class="lg:col-span-9 space-y-4">
|
|
<form wire:submit.prevent="submit" id="prima-nota-form" class="space-y-4">
|
|
{{ $this->form }}
|
|
</form>
|
|
|
|
@php($hdr = $this->getHeaderSummary())
|
|
@php($delta = (float) ($hdr['delta'] ?? 0))
|
|
@php($isBilanciata = (bool) ($hdr['is_bilanciata'] ?? false))
|
|
|
|
<x-filament::section>
|
|
<x-slot name="heading">Totali e Quadratura</x-slot>
|
|
<div class="grid grid-cols-1 gap-3 md:grid-cols-3">
|
|
<div class="rounded-lg border bg-gray-50 p-3">
|
|
<div class="text-xs text-gray-500">Totale Dare</div>
|
|
<div class="mt-1 text-lg font-semibold">€ {{ number_format((float) ($hdr['totale_dare'] ?? 0), 2, ',', '.') }}</div>
|
|
</div>
|
|
<div class="rounded-lg border bg-gray-50 p-3">
|
|
<div class="text-xs text-gray-500">Totale Avere</div>
|
|
<div class="mt-1 text-lg font-semibold">€ {{ number_format((float) ($hdr['totale_avere'] ?? 0), 2, ',', '.') }}</div>
|
|
</div>
|
|
<div class="rounded-lg border p-3 {{ $isBilanciata ? 'bg-success-50 border-success-200' : 'bg-danger-50 border-danger-200' }}">
|
|
<div class="text-xs text-gray-500">Quadratura (delta)</div>
|
|
<div class="mt-1 text-lg font-semibold {{ $isBilanciata ? 'text-success-700' : 'text-danger-700' }}">€ {{ number_format($delta, 2, ',', '.') }}</div>
|
|
<div class="text-xs text-gray-500">
|
|
@if($isBilanciata)
|
|
Registrazione bilanciata
|
|
@else
|
|
Sbilancio: € {{ number_format(abs($delta), 2, ',', '.') }}
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-filament::section>
|
|
</div>
|
|
|
|
<div class="lg:col-span-3 space-y-4 lg:sticky lg:top-4 lg:self-start">
|
|
<x-filament::section>
|
|
<x-slot name="heading">Funzioni base</x-slot>
|
|
<div class="space-y-2">
|
|
<x-filament::button form="prima-nota-form" type="submit" color="primary" class="w-full" icon="heroicon-o-check" :disabled="!$isBilanciata">
|
|
Memorizza
|
|
</x-filament::button>
|
|
<x-filament::button color="gray" tag="a" href="{{ \App\Filament\Pages\Contabilita\PrimaNotaArchivio::getUrl(panel: 'admin-filament') }}" class="w-full">
|
|
Annulla
|
|
</x-filament::button>
|
|
</div>
|
|
</x-filament::section>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-filament-panels::page>
|