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 = "
- | ID |
+ Zähler |
Import |
Export |
- Solarbezug |
- Netzbezug |
- Solar Einspeisung |
- Solarverkauf |
+ Solarbez. |
+ Netzbez. |
+ Solar Eins. |
+ Solarverk. |
Solar CHF |
Netz CHF |
Einspeis. CHF |
@@ -366,13 +366,10 @@ $html = "
";
}
- $html .= "
-
-
- | 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 = "
- | ID |
+ Zähler |
Typ |
Start |
Ende |
@@ -410,13 +407,11 @@ $html = "
$usedTariffs = array_merge($usedTariffs, $cost['tariffs']);
}
- $html .= "
-
-
- | Total Nebenkosten: |
- " . number_format($result['sum'], 2) . " CHF |
-
-
";
+ $html .= "
+ | Total Nebenkosten: |
+ " . number_format($total, 2) . " CHF |
+
+
";
if (!empty($usedTariffs)) {
$html .= "Angewendete Nebenkostentarife:
";
@@ -424,7 +419,7 @@ $html = "
$html .= "- " . date('d.m.Y', $t['start']) . " – " . date('d.m.Y', $t['end']) . ": " .
number_format($t['price'], 2) . " Rp
";
}
- $html .= "
";
+ $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;
-}
-
}
?>