Kundenportal: Rechnungsliste kennt das Projekt (Feld projekt aus den Stripe-Metadaten)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8627ed1124
commit
987268e2f0
3 files changed
+32
-1
No files matched your search
@@ -59,7 +59,8 @@ const visibleToCustomer = (raw) => ISSUED.has(raw.status) && (raw.total ?? 0) >
|
||||
/**
|
||||
* Stripe-Rechnung in der Form des Kunden-Tabs (wie sanitizeInvoice fuer InvoiceNinja, Betraege in Euro). Offen sind
|
||||
* "open" und "uncollectible" (Stripe nimmt die Zahlung weiter an); ueberfaellig, wenn die Faelligkeit vor dem
|
||||
* Berliner Tag today (YYYY-MM-DD) liegt.
|
||||
* Berliner Tag today (YYYY-MM-DD) liegt. `projekt` ist der Projektname aus den Stripe-Metadaten (Projektrechnungen aus dem
|
||||
* WOMS), sonst leer.
|
||||
*/
|
||||
export function customerStripeInvoice(raw, { today = berlinDate() } = {}) {
|
||||
const outstanding = raw.status === 'open' || raw.status === 'uncollectible'
|
||||
@@ -83,6 +84,7 @@ export function customerStripeInvoice(raw, { today = berlinDate() } = {}) {
|
||||
overdue,
|
||||
portalUrl: raw.hosted_invoice_url || '',
|
||||
hasPdf: Boolean(raw.invoice_pdf),
|
||||
projekt: raw.metadata?.projektName || '',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user