From cc5dad6d9a9e939140cb44c3e26eef1c58ef93e2 Mon Sep 17 00:00:00 2001 From: DanielHaefliger Date: Fri, 5 Dec 2025 11:32:11 +0100 Subject: [PATCH] no message --- Abrechnung/module.php | 63 +++++++++++++------------------------------ 1 file changed, 18 insertions(+), 45 deletions(-) diff --git a/Abrechnung/module.php b/Abrechnung/module.php index 34f7366..cb360d1 100644 --- a/Abrechnung/module.php +++ b/Abrechnung/module.php @@ -143,7 +143,7 @@ private function BuildUserInvoice($pdf, $user, $power, $water, $tariffs, $from,

Abrechnungszeitraum: " . date('d.m.Y', $from) . " – " . date('d.m.Y', $to) . "

-

+
"; // ========================= Elektrizität ========================= @@ -163,7 +163,7 @@ private function BuildUserInvoice($pdf, $user, $power, $water, $tariffs, $from, . " — " . number_format($t['price'], 2) . " Rp/kWh" . ""; } - $html .= "

"; + $html .= "
"; } // ========================= Nebenkosten ========================= @@ -326,13 +326,13 @@ private function BuildUserInvoice($pdf, $user, $power, $water, $tariffs, $from, $html = " - + - - - - + + + + @@ -366,13 +366,10 @@ $html = " "; } - $html .= " -
IDZähler Import ExportSolarbezugNetzbezugSolar EinspeisungSolarverkauf Solarbez.Netzbez.Solar Eins.Solarverk. Solar CHF Netz CHF Einspeis. CHF
- - - - -
Total Elektrizität:" . number_format($result['sum'], 2) . " CHF

"; + $html .= " + Total Elektrizität: + " . number_format($sum, 2) . " CHF +
"; return ['html' => $html, 'sum' => $sum]; } @@ -384,7 +381,7 @@ $html = " $html = " - + @@ -410,13 +407,11 @@ $html = " $usedTariffs = array_merge($usedTariffs, $cost['tariffs']); } - $html .= " -
IDZähler Typ Start Ende
- - - - -
Total Nebenkosten:" . number_format($result['sum'], 2) . " CHF

"; + $html .= " + Total Nebenkosten: + " . number_format($total, 2) . " CHF + +
"; if (!empty($usedTariffs)) { $html .= "

Angewendete Nebenkostentarife:



"; + $html .= "
"; } return ['html' => $html, 'sum' => $total]; @@ -649,27 +644,5 @@ $html = " } return end($cands); } - private function CollectTariffsForUser($tariffs, $types) -{ - $result = []; - $wanted = array_map('strtolower', $types); - - foreach ($tariffs as $t) { - $type = strtolower(trim($t['unit_type'] ?? '')); - if (!in_array($type, $wanted)) continue; - - $start = $this->toUnixTs($t['start'], false); - $end = $this->toUnixTs($t['end'], true); - - $result[] = [ - 'start' => $start, - 'end' => $end, - 'price' => (float)$t['price'] - ]; - } - - return $result; -} - } ?>