From 667617296b5550ec1004da3e8bdaa7ab9081d57a Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 25 May 2026 22:59:18 +0200 Subject: [PATCH] Phase7: Void/Refund logic --- .../admin/billing/invoice-detail-view.tsx | 20 +++++++++---------- .../billing/customer-credit-note-list.tsx | 20 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/components/admin/billing/invoice-detail-view.tsx b/src/components/admin/billing/invoice-detail-view.tsx index 88eebe2..c13e8cb 100644 --- a/src/components/admin/billing/invoice-detail-view.tsx +++ b/src/components/admin/billing/invoice-detail-view.tsx @@ -462,34 +462,34 @@ export function InvoiceDetailView({ detail, creditNotes = [] }: Props) { - - - + + - - + + {creditNotes.map((cn) => ( - - - - -
{t("creditNoteNumberHeader")}{t("creditNoteKindHeader")} + {t("creditNoteNumberHeader")}{t("creditNoteKindHeader")} {t("creditNoteAmountHeader")} {t("creditNoteReasonHeader")}{t("creditNoteIssuedHeader")}{t("creditNoteReasonHeader")}{t("creditNoteIssuedHeader")} {t("creditNotePdfHeader")}
+ {cn.creditNoteNumber} + {t(`creditNoteKind_${cn.kind}` as any)} + CHF {cn.amountChf.toFixed(2)} + {cn.reason ?? "—"} + {cn.issuedAt.slice(0, 10)} diff --git a/src/components/billing/customer-credit-note-list.tsx b/src/components/billing/customer-credit-note-list.tsx index 62275c8..159896c 100644 --- a/src/components/billing/customer-credit-note-list.tsx +++ b/src/components/billing/customer-credit-note-list.tsx @@ -39,11 +39,11 @@ export function CustomerCreditNoteList({ creditNotes }: Props) { - - - - - + + + + + @@ -53,19 +53,19 @@ export function CustomerCreditNoteList({ creditNotes }: Props) { key={cn.id} className="border-t border-border align-middle" > - - - - -
{t("creditNoteNumberCol")}{t("creditNoteInvoiceCol")}{t("creditNoteIssuedCol")}{t("creditNoteAmountCol")}{t("creditNoteKindCol")}{t("creditNoteNumberCol")}{t("creditNoteInvoiceCol")}{t("creditNoteIssuedCol")}{t("creditNoteAmountCol")}{t("creditNoteKindCol")} {t("creditNotePdfCol")}
+ {cn.creditNoteNumber} + {cn.invoiceNumber} + {fmt.dateTime(new Date(cn.issuedAt), { dateStyle: "medium" })} + CHF {cn.amountChf.toFixed(2)} +