no message
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user