no message

This commit is contained in:
2025-12-11 11:16:37 +01:00
parent 7680feda8d
commit 7daa8b7671

View File

@@ -306,20 +306,29 @@ class Abrechnung extends IPSModule
}
}
// Überspringe Fälle, in denen kein Stromverbrauch und keine Einspeisung vorhanden ist
if ($impTotal == 0.0 && $expTotal == 0.0) {
continue;
}
$ratio = 0.0;
$pvCoversAll = true; // Kein Verbrauch => PV deckt "alles"
} else {
// Verhältnis PV / Netz pro User
if ($impTotal <= $expTotal && $expTotal > 0.0) {
if ($impTotal == 0.0) {
// Kein Import, nur Export vorhanden
$ratio = 0.0;
$pvCoversAll = true; // PV deckt alles
} elseif ($expTotal == 0.0) {
// Kein Export, nur Import vorhanden
$ratio = 0.0;
$pvCoversAll = false; // PV deckt nichts
} elseif ($impTotal <= $expTotal) {
// PV deckt mehr als Import
$ratio = $impTotal / $expTotal;
$pvCoversAll = true;
} elseif ($impTotal > 0.0) {
} else {
// PV deckt weniger als Import
$ratio = $expTotal / $impTotal;
$pvCoversAll = false;
} else {
$ratio = 0.0;
$pvCoversAll = true;
}
}
// Werte pro Zähler verteilen