diff --git a/src/Controllers/InvoiceController.php b/src/Controllers/InvoiceController.php index 87baf15..890674f 100644 --- a/src/Controllers/InvoiceController.php +++ b/src/Controllers/InvoiceController.php @@ -114,7 +114,7 @@ class InvoiceController $originalrechnung = null; if (!empty($invoice['storno_of_id'])) { $originalrechnung = \Steuerkram\Database::fetchOne( - 'SELECT id, rechnungs_nr FROM invoices WHERE id = ?', + 'SELECT id, rechnungs_nr, rechnungs_datum FROM invoices WHERE id = ?', [(int)$invoice['storno_of_id']] ); } diff --git a/src/Services/PdfInvoiceService.php b/src/Services/PdfInvoiceService.php index d465cb9..4875497 100644 --- a/src/Services/PdfInvoiceService.php +++ b/src/Services/PdfInvoiceService.php @@ -110,8 +110,8 @@ class PdfInvoiceService $stornoRefHtml = ''; if ($isStorno && !empty($inv['original_rechnungs_nr'])) { $stornoRefHtml = '
' - . 'Stornierung der Rechnung Nr. ' . $h($inv['original_rechnungs_nr']) . '' - . ' vom ' . $fmtDate($inv['original_rechnungs_datum'] ?? '') + . 'zu Rechnung Nr. ' . $h($inv['original_rechnungs_nr']) . '
' + . 'vom ' . $fmtDate($inv['original_rechnungs_datum'] ?? '') . '
'; } diff --git a/src/Views/invoices/show.php b/src/Views/invoices/show.php index 3952a9f..0b0607e 100644 --- a/src/Views/invoices/show.php +++ b/src/Views/invoices/show.php @@ -106,7 +106,8 @@ $badgeClass = match($invoice['status']) {
- Stornierung der Rechnung Nr. + zu Rechnung Nr.
+ vom