Skip to content

Commit 4d5eda7

Browse files
committed
fix: colori controlli gestionale
1 parent eac2db9 commit 4d5eda7

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

modules/aggiornamenti/controlli.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ function avviaControllo(controllo) {
316316
});
317317
318318
// Aggiungi le nuove classi in base al tipo di badge piu grave
319-
let colorClasses = determineCardClasses(hasDanger ? 1 : 0, hasWarning ? 1 : 0, 0);
319+
let colorClasses = determineCardClasses(hasDanger ? 1 : 0, hasWarning ? 1 : 0, infoCount > 0 ? 1 : 0);
320320
applyCardColorClasses(headerElement, titleElement, cardElement, colorClasses);
321321
322322
// Mostra le badge per tipo di avviso
@@ -574,6 +574,10 @@ function avviaControlloSingolo(id) {
574574
headerElement.addClass("requirements-card-header-warning");
575575
titleElement.addClass("requirements-card-title-warning");
576576
cardElement.addClass("card-warning");
577+
} else if (infoCount > 0) {
578+
headerElement.addClass("requirements-card-header-info");
579+
titleElement.addClass("requirements-card-title-info");
580+
cardElement.addClass("card-info");
577581
}
578582
579583
// Mostra le badge per tipo di avviso

modules/aggiornamenti/src/Controlli/DatiFattureElettroniche.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ public function getName()
4747

4848
public function getType($record)
4949
{
50-
return 'info';
50+
// Se il record ha un tipo specifico (passato da processErrors), usalo
51+
// Altrimenti ritorna 'info' come default
52+
return $record['type'] ?? 'info';
5153
}
5254

5355
public function check()
@@ -777,7 +779,7 @@ protected function getTipoDocumentoFE(Fattura $fattura)
777779
} elseif ($fattura->tipo->getTranslation('title') === 'Nota di debito') {
778780
return 'TD05';
779781
} else {
780-
return 'TD01'; // Fattura standard
782+
return $fattura->tipo->codice_tipo_documento_fe ?: 'TD01';
781783
}
782784
}
783785

0 commit comments

Comments
 (0)