@extends('layouts.app') @section('title', 'Voce di Spesa - ' . $voceSpesa->denominazione) @section('content')

{{ $voceSpesa->denominazione }} {{ ucfirst($voceSpesa->stato) }}

Informazioni Base
Codice: {{ $voceSpesa->codice_spesa }}
Stabile: {{ $voceSpesa->stabile->denominazione }}
Categoria: {{ $voceSpesa->categoria }} @if($voceSpesa->sottocategoria)
{{ $voceSpesa->sottocategoria }} @endif
Importo Previsto: @if($voceSpesa->importo_previsto) € {{ number_format($voceSpesa->importo_previsto, 2, ',', '.') }} @else Non specificato @endif
Periodicità: @if($voceSpesa->periodicita) {{ ucfirst(str_replace('_', ' ', $voceSpesa->periodicita)) }} @else Non specificata @endif
Ripartizione Personalizzata: @if($voceSpesa->ripartizione_personalizzata) @else No @endif
Configurazione Ripartizione
Tabella Millesimale Default: {{ $voceSpesa->tabellaMillesimaleDefault->denominazione }}
{{ $voceSpesa->tabellaMillesimaleDefault->tipo_tabella }}
Ripartizioni Create: {{ $voceSpesa->ripartizioniSpese->count() }} @if($voceSpesa->ripartizioniSpese->count() > 0)
Ultima: {{ $voceSpesa->ripartizioniSpese->first()->created_at->format('d/m/Y') }} @endif
Totale Ripartito: @php $totaleRipartito = $voceSpesa->ripartizioniSpese->sum('importo_totale'); @endphp @if($totaleRipartito > 0) € {{ number_format($totaleRipartito, 2, ',', '.') }} @else € 0,00 @endif
@if($voceSpesa->descrizione || $voceSpesa->note || $voceSpesa->tags)
Descrizione e Note
@if($voceSpesa->descrizione)
Descrizione:

{{ $voceSpesa->descrizione }}

@endif @if($voceSpesa->tags)
Tags:
@foreach(explode(',', $voceSpesa->tags) as $tag) {{ trim($tag) }} @endforeach
@endif @if($voceSpesa->note)
Note:

{{ $voceSpesa->note }}

@endif
@endif @if($voceSpesa->ripartizioniSpese->count() > 0)
Ripartizioni Associate
Nuova Ripartizione
@foreach($voceSpesa->ripartizioniSpese as $ripartizione) @endforeach
Codice Descrizione Importo Data Stato Azioni
{{ $ripartizione->codice_ripartizione }} {{ $ripartizione->descrizione }} € {{ number_format($ripartizione->importo_totale, 2, ',', '.') }} {{ $ripartizione->data_ripartizione->format('d/m/Y') }} {{ ucfirst($ripartizione->stato) }}
@endif
Informazioni Sistema
Creato: {{ $voceSpesa->created_at->format('d/m/Y H:i:s') }} @if($voceSpesa->createdBy) da {{ $voceSpesa->createdBy->name }} @endif
Ultimo aggiornamento: {{ $voceSpesa->updated_at->format('d/m/Y H:i:s') }} @if($voceSpesa->updatedBy) da {{ $voceSpesa->updatedBy->name }} @endif
@endsection