no message
This commit is contained in:
@@ -406,13 +406,14 @@ private function BuildQRBill($pdf, $user, $amount)
|
||||
$creditorStr = mb_substr($this->ReadPropertyString('CreditorAddress'), 0, 70);
|
||||
$creditorCity = mb_substr($this->ReadPropertyString('CreditorCity'), 0, 70);
|
||||
|
||||
$debtorName = mb_substr($user['name'] ?? '', 0, 70);
|
||||
// Fallback falls ein Mieter keinen Namen oder Ort hinterlegt hat (Banken verlangen das zwingend)
|
||||
$debtorName = mb_substr(empty($user['name']) ? 'Unbekannt' : $user['name'], 0, 70);
|
||||
$debtorStr = mb_substr($user['address'] ?? '', 0, 70);
|
||||
$debtorCity = mb_substr($user['city'] ?? '', 0, 70);
|
||||
$debtorCity = mb_substr(empty($user['city']) ? 'Unbekannt' : $user['city'], 0, 70);
|
||||
|
||||
$amountStr = number_format($amount, 2, '.', '');
|
||||
|
||||
// EPC / Swiss QR Code String Format
|
||||
// EPC / Swiss QR Code String Format (Exakte Reihenfolge ist kritisch!)
|
||||
$lines = [
|
||||
'SPC', '0200', '1', $iban, 'K',
|
||||
$creditorName, $creditorStr, $creditorCity, '', '', 'CH',
|
||||
@@ -420,12 +421,12 @@ private function BuildQRBill($pdf, $user, $amount)
|
||||
$amountStr, 'CHF', 'K',
|
||||
$debtorName, $debtorStr, $debtorCity, '', '', 'CH',
|
||||
'NON', '', // Reference Type (NON = Ohne Referenz)
|
||||
'EPD', 'Abrechnung Liegenschaft'
|
||||
'Abrechnung Liegenschaft', // 30. Unstrukturierte Mitteilung
|
||||
'EPD' // 31. Trailer (Zwingend exakt 'EPD' am Schluss!)
|
||||
];
|
||||
|
||||
return implode("\r\n", $lines);
|
||||
}
|
||||
|
||||
// ====================== Stromkosten (15-Minuten, alle User) ======================
|
||||
|
||||
private function CalculateAllPowerCosts($powerMeters, $tariffs, $from, $to)
|
||||
|
||||
Reference in New Issue
Block a user