no message

This commit is contained in:
2026-06-29 19:35:32 +02:00
parent cda68e73bd
commit 967cc0006e
+8 -2
View File
@@ -1390,10 +1390,16 @@ public function GenerateInvoices()
$periodText = date('d.m.Y', $from) . ' - ' . date('d.m.Y', $to); $periodText = date('d.m.Y', $from) . ' - ' . date('d.m.Y', $to);
$meterText = empty($meterNames) ? '-' : implode("\n", $meterNames); $meterText = empty($meterNames) ? '-' : implode("\n", $meterNames);
$addressText = trim(($user['name'] ?? '') . "\n" . ($user['address'] ?? '') . "\n" . ($user['city'] ?? '')); $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( $infoBoxHeight = max(
32, 32,
18 + $pdf->getStringHeight(82, $meterText), $meterBlockHeight,
8 + $pdf->getStringHeight(82, $addressText) $addressBlockHeight,
22 + $pdf->getStringHeight(82, $meterText),
10 + $pdf->getStringHeight(82, $addressText)
); );
$y = $pdf->GetY(); $y = $pdf->GetY();