From 967cc0006ef8cfb23567a38c5c0f162615cb01a1 Mon Sep 17 00:00:00 2001 From: DanielHaefliger Date: Mon, 29 Jun 2026 19:35:32 +0200 Subject: [PATCH] no message --- Abrechnung/module.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Abrechnung/module.php b/Abrechnung/module.php index d6fffa0..f453ba8 100644 --- a/Abrechnung/module.php +++ b/Abrechnung/module.php @@ -1390,10 +1390,16 @@ public function GenerateInvoices() $periodText = date('d.m.Y', $from) . ' - ' . date('d.m.Y', $to); $meterText = empty($meterNames) ? '-' : implode("\n", $meterNames); $addressText = trim(($user['name'] ?? '') . "\n" . ($user['address'] ?? '') . "\n" . ($user['city'] ?? '')); + $meterLineCount = max(1, count(preg_split('/\r\n|\r|\n/', $meterText))); + $addressLineCount = max(1, count(preg_split('/\r\n|\r|\n/', $addressText))); + $meterBlockHeight = 22 + ($meterLineCount * 4.6); + $addressBlockHeight = 10 + ($addressLineCount * 4.6); $infoBoxHeight = max( 32, - 18 + $pdf->getStringHeight(82, $meterText), - 8 + $pdf->getStringHeight(82, $addressText) + $meterBlockHeight, + $addressBlockHeight, + 22 + $pdf->getStringHeight(82, $meterText), + 10 + $pdf->getStringHeight(82, $addressText) ); $y = $pdf->GetY();