Fix: Beleg-Detailansicht zeigt Link zur verknüpften Ausgangsrechnung

This commit is contained in:
fds2610-bot 2026-05-05 15:35:07 +02:00
parent e62fbe9efe
commit 8e0c73289a

View file

@ -71,6 +71,14 @@ $suppliers = $suppliers ?? [];
<?= $beleg['rechnungs_nr'] ? $h($beleg['rechnungs_nr']) : '<span class="text-muted">–</span>' ?> <?= $beleg['rechnungs_nr'] ? $h($beleg['rechnungs_nr']) : '<span class="text-muted">–</span>' ?>
<?php endif; ?> <?php endif; ?>
</div> </div>
<?php if (!empty($beleg['invoice_id'])): ?>
<div>
<span class="text-muted text-sm">Ausgangsrechnung</span><br>
<a href="/invoices/<?= (int)$beleg['invoice_id'] ?>">
<?= $h($beleg['rechnungs_nr'] ?? ('Rechnung #' . $beleg['invoice_id'])) ?>
</a>
</div>
<?php endif; ?>
<div> <div>
<span class="text-muted text-sm">Brutto (Buchungen)</span><br> <span class="text-muted text-sm">Brutto (Buchungen)</span><br>
<?= $beleg['betrag_brutto'] ? '<strong>' . $fmt($beleg['betrag_brutto']) . '</strong>' : '<span class="text-muted">–</span>' ?> <?= $beleg['betrag_brutto'] ? '<strong>' . $fmt($beleg['betrag_brutto']) . '</strong>' : '<span class="text-muted">–</span>' ?>