Merge pull request 'Fix: Inhaber-Zeile in Rechnungs-Footer nur bei gefuelltem Feld' (#63) from fds2610-bot/Steuerkram:main into main

Reviewed-on: https://codeberg.org/fds2610/Steuerkram/pulls/63
This commit is contained in:
fds2610 2026-05-03 18:04:18 +02:00
commit 652050d20f
3 changed files with 5 additions and 4 deletions

View file

@ -220,13 +220,14 @@ HTML;
private function buildFooter(array $settings): string
{
$h = fn($v) => htmlspecialchars((string)$v, ENT_QUOTES, 'UTF-8');
$inhaber = trim((string)($settings['inhaber'] ?? ''));
$inhaberLine = $inhaber !== '' ? "Inh. {$h($inhaber)}<br>" : '';
return <<<HTML
<table class="footer-table">
<tr>
<td>
<strong>{$h($settings['firma'] ?? '')}</strong><br>
Inh. {$h($settings['inhaber'] ?? '')}<br>
{$h($settings['strasse'] ?? '')}<br>
{$inhaberLine}{$h($settings['strasse'] ?? '')}<br>
{$h($settings['plz'] ?? '')} {$h($settings['ort'] ?? '')}<br>
USt-ID: {$h($settings['ust_id'] ?? '')}
</td>

View file

@ -174,7 +174,7 @@ $badgeClass = match($invoice['status']) {
<div style="border-top:1px solid #ccc;padding-top:.75rem;display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:1rem;font-size:.58rem;color:#555">
<div style="min-width:0">
<strong><?= $h($settings['firma'] ?? '') ?></strong><br>
Inh. <?= $h($settings['inhaber'] ?? '') ?><br>
<?php if (trim((string)($settings['inhaber'] ?? '')) !== ''): ?>Inh. <?= $h($settings['inhaber']) ?><br><?php endif; ?>
<?= $h($settings['strasse'] ?? '') ?><br>
<?= $h(($settings['plz'] ?? '') . ' ' . ($settings['ort'] ?? '')) ?><br>
USt-ID: <?= $h($settings['ust_id'] ?? '') ?>

View file

@ -1 +1 @@
1-260428
1-260503