@php $stats = $this->acquaDashboardStats; $annoGestioneAttivo = \App\Support\AnnoGestioneContext::resolveActiveAnno(auth()->user()); $fatturePerGestione = $this->acquaFatturePerGestione; $lettureCondomini = $this->acquaLettureCondomini; $tariffeRows = $this->acquaTariffeRows; $legacyArchive = $this->acquaLegacyArchiveAvailability; $legacyExtraRows = $this->acquaAltreVociLegacy; $legacyOpsSummary = $this->acquaLegacyOperazioniSummary; $legacyOpsRows = $this->acquaLegacyOperazioniRows; $acquaContratto = $this->acquaContrattoStabile; $acquaRipartoNominativi = $this->acquaRipartoNominativiLegacy; $campagnaStats = $this->acquaCampagnaStats; $campagnaRows = $this->acquaCampagnaRows; @endphp

Servizi / Beni comuni - ACQUA

Cruscotto operativo per utenze, beni comuni, locali condivisi e contatori acqua dello stabile. Qui convivono contratti, servizi ad uso comune, rimborsi spesa, contatori generali e contatori particolari con storico e tariffe.

Anno gestione attivo: {{ $annoGestioneAttivo }}
@if($acquaTab === 'dashboard')
Totale fatture acqua (import registrato)
EUR {{ number_format((float) ($stats['totale_fatture'] ?? 0), 2, ',', '.') }}
Controllo legacy operazioni (AC1+AC2)
EUR {{ number_format((float) ($stats['totale_operazioni_ac12_legacy'] ?? 0), 2, ',', '.') }}
Delta fatture registrate - legacy AC1+AC2: {{ number_format((float) ($stats['delta_operazioni_vs_fatture'] ?? 0), 2, ',', '.') }}
Letture condomini registrate
{{ number_format((int) ($stats['totale_letture'] ?? 0), 0, ',', '.') }}
con riferimento acquisizione: {{ number_format((int) ($stats['totale_letture_con_riferimento'] ?? 0), 0, ',', '.') }}
Consumi e tariffe
{{ number_format((float) ($stats['totale_consumi_mc'] ?? 0), 3, ',', '.') }} mc
snapshot tariffe: {{ number_format((int) ($stats['totale_tariffe'] ?? 0), 0, ',', '.') }}
Copertura archivio legacy ACEA
Tabella contratti_ACEA: {{ ($legacyArchive['contratti_acea'] ?? false) ? 'presente' : 'non presente' }}
Tabella Tariffe_ACEA_Standard: {{ ($legacyArchive['tariffe_acea_standard'] ?? false) ? 'presente' : 'non presente' }}
{{ $legacyArchive['note'] ?? '' }}
Contratto servizio ACQUA (stabile -> fornitore)
Allinea/crea contratto con Acea Ato2
Servizio: {{ $acquaContratto['servizio_nome'] ?: 'non configurato' }}
Fornitore: {{ $acquaContratto['fornitore_nome'] ?: 'non assegnato' }}
Codice utenza: {{ $acquaContratto['codice_utenza'] ?: '—' }}
Codice cliente: {{ $acquaContratto['codice_cliente'] ?: '—' }}
Codice contratto: {{ $acquaContratto['codice_contratto'] ?: '—' }}
Matricola contatore: {{ $acquaContratto['matricola'] ?: '—' }}
@if(!($acquaContratto['fornitore_nome'] ?? null) && ($acquaContratto['suggerito_fornitore'] ?? null))
Suggerito in anagrafica fornitori: {{ $acquaContratto['suggerito_fornitore'] }}
@endif
@endif @if($acquaTab === 'fatture')
Fatture registrate divise per gestione
@forelse($fatturePerGestione as $row) @empty @endforelse @if(count($fatturePerGestione) > 0) @endif
Gestione Numero fatture FE Manuali Totale EUR
{{ strtoupper((string) ($row['gestione'] ?? 'non definita')) }} {{ number_format((int) ($row['fatture_count'] ?? 0), 0, ',', '.') }} {{ number_format((int) ($row['fe_count'] ?? 0), 0, ',', '.') }} {{ number_format((int) ($row['manual_count'] ?? 0), 0, ',', '.') }} {{ number_format((float) ($row['totale_fatture'] ?? 0), 2, ',', '.') }}
Nessuna fattura acqua registrata.
Totale {{ number_format((int) collect($fatturePerGestione)->sum('fatture_count'), 0, ',', '.') }} {{ number_format((int) collect($fatturePerGestione)->sum('fe_count'), 0, ',', '.') }} {{ number_format((int) collect($fatturePerGestione)->sum('manual_count'), 0, ',', '.') }} {{ number_format((float) collect($fatturePerGestione)->sum('totale_fatture'), 2, ',', '.') }}
Archivio legacy operazioni AC1 + AC2 (collegamento fatture)
Righe: {{ number_format((int) ($legacyOpsSummary['righe'] ?? 0), 0, ',', '.') }}
Totale AC1: {{ number_format((float) (($legacyOpsSummary['voci']['AC1'] ?? 0)), 2, ',', '.') }}
Totale AC2: {{ number_format((float) (($legacyOpsSummary['voci']['AC2'] ?? 0)), 2, ',', '.') }}
Totale AC1+AC2: {{ number_format((float) ($legacyOpsSummary['totale'] ?? 0), 2, ',', '.') }}
@forelse($legacyOpsRows as $row) @empty @endforelse
Data op. Voce Doc legacy Fornitore Descrizione Importo Match fattura locale
{{ $row['data_operazione'] ? \Carbon\Carbon::parse($row['data_operazione'])->format('d/m/Y') : '—' }} {{ $row['cod_spe'] ?: '—' }} {{ $row['num_fat'] ?: '—' }}
{{ $row['dt_fat'] ? \Carbon\Carbon::parse($row['dt_fat'])->format('d/m/Y') : '—' }}
{{ $row['fornitore_legacy'] ?: ('cod. ' . ($row['cod_for'] ?: '—')) }} {{ $row['benef'] ?: '—' }} {{ number_format((float) ($row['importo'] ?? 0), 2, ',', '.') }} @if(($row['matched_fattura_id'] ?? null)) OK {{ strtoupper((string) ($row['match_type'] ?? '')) }}
ID {{ $row['matched_fattura_id'] }} @if($row['matched_fe_id']) / FE {{ $row['matched_fe_id'] }} @endif
@else DA COLLEGARE @endif
Nessuna operazione AC1/AC2 trovata in archivio legacy.
Altre voci AC (escluse AC1/AC2) - archivio legacy
@forelse($legacyExtraRows as $row) @empty @endforelse
Voce Totale EUR
{{ $row['cod_spe'] }} {{ number_format((float) ($row['totale'] ?? 0), 2, ',', '.') }}
Nessuna voce AC diversa da AC1 trovata.
@endif @if($acquaTab === 'letture')
Campagna letture acqua per unità
Primo slice operativo: genera richieste per le unità dello stabile, dividi fatte e non fatte, e usa un link pubblico firmato per inviare lettura attuale più massimo due foto.
Prepara / aggiorna campagna letture
Unità
{{ $campagnaStats['totale'] }}
Fatte
{{ $campagnaStats['completate'] }}
Pendenti
{{ $campagnaStats['pendenti'] }}
Sollecitate
{{ $campagnaStats['sollecitate'] }}
@forelse($campagnaRows as $row) @empty @endforelse
Unità Nominativo Lettura precedente Stato Richiesta Azioni
{{ $row['unit_label'] }} {{ $row['nominativo'] }} {{ $row['previous_reading'] !== null ? number_format((float) $row['previous_reading'], 3, ',', '.') : '—' }} @if($row['status'] === 'fatta') Fatta @elseif($row['status'] === 'sollecito') Sollecito @elseif($row['status'] === 'richiesta') Richiesta inviata @else Da inviare @endif {{ $row['requested_at'] ?: '—' }} @if($row['deadline_at'])
Scadenza {{ $row['deadline_at'] }}
@endif
Apri link @if($row['request_id'] && $row['status'] !== 'fatta') @endif
Nessuna unità disponibile per la campagna letture.
Base nominativi riparto ACQUA (legacy) per inserimento letture manuali
Fonte letture manuali PDF: /home/michele/netgescon/netgescon-laravel/Miki-Bug-workspace/ACQUA-Acea/06 - 2024 VIA_A_DORIA_36.0.RIPARTO.2.pdf
@forelse($acquaRipartoNominativi as $row) @empty @endforelse @if(count($acquaRipartoNominativi) > 0) @endif
Scala Interno Nominativo Ruolo Lettura iniziale Consumo mc Quota EUR (riparto)
{{ $row['scala'] ?: '—' }} {{ $row['interno'] ?: '—' }} {{ $row['nominativo'] ?: '—' }} {{ $row['ruolo'] ?: '—' }} {{ isset($row['lettura_iniziale']) && $row['lettura_iniziale'] !== null ? number_format((float) $row['lettura_iniziale'], 3, ',', '.') : '—' }} {{ isset($row['consumo_mc']) && $row['consumo_mc'] !== null ? number_format((float) $row['consumo_mc'], 3, ',', '.') : '—' }} {{ number_format((float) ($row['quota_euro'] ?? 0), 2, ',', '.') }}
Nominativi riparto legacy non disponibili.
Totali {{ number_format((float) collect($acquaRipartoNominativi)->sum(fn($r) => (float) ($r['consumo_mc'] ?? 0)), 3, ',', '.') }} {{ number_format((float) collect($acquaRipartoNominativi)->sum(fn($r) => (float) ($r['quota_euro'] ?? 0)), 2, ',', '.') }}
Versamenti/Letture condomini (con data ricezione e riferimento)
Apri archivio letture (filtrato per anno {{ $annoGestioneAttivo }})
@forelse($lettureCondomini as $row) @empty @endforelse
Data ricezione Servizio Unità Canale Riferimento / immagine Periodo Lettura/consumo
{{ $row['data_ricezione'] ?: '—' }} {{ $row['servizio'] ?: '—' }}
Matr. {{ $row['matricola'] ?: '—' }}
{{ trim((string) ($row['unita'] ?? '')) !== '' ? $row['unita'] : '—' }} {{ strtoupper((string) ($row['canale'] ?? '—')) }} {{ $row['riferimento'] ?: '—' }} {{ $row['periodo'] ?: '—' }} @if(isset($row['consumo_valore']) && $row['consumo_valore'] !== null) {{ number_format((float) $row['consumo_valore'], 3, ',', '.') }} {{ $row['consumo_unita'] ?: 'mc' }} @else — @endif
Nessuna lettura disponibile.
@endif @if($acquaTab === 'tariffe')
Tariffe caricate da contratti/fatture
@forelse($tariffeRows as $row) @empty @endforelse
FE Data fattura Decorrenza Profilo Delibere IVA Scaglioni UI1/UI2/UI3/UI4
#{{ $row['fattura_elettronica_id'] ?? '—' }} {{ $row['data_fattura'] ?: '—' }} {{ $row['decorrenza_tariffe'] ?: '—' }} {{ $row['profilo'] ?: '—' }} ATO: {{ $row['delibera_ato'] ?: '—' }}
ARERA: {{ $row['delibera_arera'] ?: '—' }}
{{ $row['iva_codice'] ?: '—' }} @if(isset($row['iva_aliquota']) && $row['iva_aliquota'] !== null)({{ number_format((float) $row['iva_aliquota'], 2, ',', '.') }}%)@endif {{ number_format((int) ($row['scaglioni_count'] ?? 0), 0, ',', '.') }} {{ number_format((float) ($row['ui1'] ?? 0), 4, ',', '.') }} / {{ number_format((float) ($row['ui2'] ?? 0), 4, ',', '.') }} / {{ number_format((float) ($row['ui3'] ?? 0), 4, ',', '.') }} / {{ number_format((float) ($row['ui4'] ?? 0), 4, ',', '.') }}
Nessuna tariffa caricata.
@endif @if($acquaTab === 'servizi')
Servizi / Utenze (anagrafica completa)
{{ $this->table }}
@endif