60 lines
3.2 KiB
PHP
Executable File
60 lines
3.2 KiB
PHP
Executable File
<x-filament-panels::page>
|
|
<div class="mx-auto max-w-7xl space-y-4">
|
|
<x-filament.components.page-breadcrumbs
|
|
:breadcrumbs="collect($this->getBreadcrumbs())->map(fn ($url, $label) => ['label' => $label, 'url' => $url])->values()->all()"
|
|
/>
|
|
|
|
@php($summary = $this->getHeaderSummary())
|
|
<x-filament::section>
|
|
<div class="flex flex-wrap items-start justify-between gap-3">
|
|
<div>
|
|
<div class="text-xs text-gray-500">Voce di spesa</div>
|
|
<div class="text-lg font-semibold text-gray-900">
|
|
{{ $this->voce->codice ? $this->voce->codice . ' — ' : '' }}{{ $this->voce->descrizione ?? ('Voce #' . $this->voce->id) }}
|
|
</div>
|
|
<div class="text-xs text-gray-500">
|
|
Tabella: {{ $this->voce->tabellaMillesimaleDefault?->codice_tabella ?? '—' }}
|
|
· Gestione: {{ $summary['gestione'] ?? '—' }}
|
|
</div>
|
|
</div>
|
|
<div class="text-xs text-gray-500">
|
|
Fatture: <span class="font-semibold text-gray-800">{{ (int) ($summary['fatture'] ?? 0) }}</span>
|
|
</div>
|
|
</div>
|
|
</x-filament::section>
|
|
|
|
<x-filament::section>
|
|
<x-slot name="heading">Totali e consumi</x-slot>
|
|
<div class="grid grid-cols-1 gap-3 md:grid-cols-5">
|
|
<div class="rounded-lg border bg-gray-50 p-3">
|
|
<div class="text-xs text-gray-500">Imponibile</div>
|
|
<div class="mt-1 text-lg font-semibold">€ {{ number_format((float) ($summary['imponibile'] ?? 0), 2, ',', '.') }}</div>
|
|
</div>
|
|
<div class="rounded-lg border bg-gray-50 p-3">
|
|
<div class="text-xs text-gray-500">IVA</div>
|
|
<div class="mt-1 text-lg font-semibold">€ {{ number_format((float) ($summary['iva'] ?? 0), 2, ',', '.') }}</div>
|
|
</div>
|
|
<div class="rounded-lg border bg-gray-50 p-3">
|
|
<div class="text-xs text-gray-500">Totale</div>
|
|
<div class="mt-1 text-lg font-semibold">€ {{ number_format((float) ($summary['totale'] ?? 0), 2, ',', '.') }}</div>
|
|
</div>
|
|
<div class="rounded-lg border bg-gray-50 p-3">
|
|
<div class="text-xs text-gray-500">Consumo totale</div>
|
|
<div class="mt-1 text-lg font-semibold">
|
|
{{ number_format((float) ($summary['consumo'] ?? 0), 3, ',', '.') }}
|
|
{{ $summary['consumo_unita'] ?? '' }}
|
|
</div>
|
|
</div>
|
|
<div class="rounded-lg border bg-gray-50 p-3">
|
|
<div class="text-xs text-gray-500">Voce attiva</div>
|
|
<div class="mt-1 text-lg font-semibold">{{ $this->voce->attiva ? 'Sì' : 'No' }}</div>
|
|
</div>
|
|
</div>
|
|
</x-filament::section>
|
|
|
|
<x-filament::section>
|
|
<x-slot name="heading">Mastrino (fatture collegate)</x-slot>
|
|
{{ $this->table }}
|
|
</x-filament::section>
|
|
</div>
|
|
</x-filament-panels::page> |