fix: avoid issues with incomplete teamer data when rendering invoice pdf

This commit is contained in:
Björn Fromme
2025-07-22 08:49:31 +02:00
parent 000cc957ce
commit b5314d270a
+4 -4
View File
@@ -34,7 +34,7 @@ class InvoiceRenderer extends AbstractPdfRenderer
$pdf->Text(135,51, $pdf->encodeString($address->getPostCode(). ' '.$address->getCity()));
// Tax ID
$pdf->Text(144,62, $pdf->encodeString($teamer->getTaxId()));
$pdf->Text(144,62, $pdf->encodeString($teamer->getTaxId() ?? '-'));
// Invoice number
$pdf->SetFont('Arial', '', 12);
@@ -45,9 +45,9 @@ class InvoiceRenderer extends AbstractPdfRenderer
// Bank account
$bankAccount = $teamer->getBankAccount();
$pdf->Text(36,233.5, $pdf->encodeString($bankAccount->getIban()));
$pdf->Text(36,241, $pdf->encodeString($bankAccount->getBic()));
$pdf->Text(36,248.5, $pdf->encodeString($bankAccount->getBank()));
$pdf->Text(36,233.5, $pdf->encodeString($bankAccount->getIban() ?? '-'));
$pdf->Text(36,241, $pdf->encodeString($bankAccount->getBic() ?? '-'));
$pdf->Text(36,248.5, $pdf->encodeString($bankAccount->getBank() ?? '-'));
// Current date