{{- /* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial */ -}} {{- /* SPDX-FileCopyrightText: 2025-2026 Christian Galo */ -}} {{/* operator_billing_invoice_detail.html Operator invoice detail (design D7; operator-billing-views: "Operator invoice detail is addressable"). Rendered as the InnerTemplate of the operator_billing.html wrapper, whose header this data's WrapperHeader supplies: the invoice's number as the title below the Billing / Invoices trail (chrome-conventions "One location trail"; the back link retired). States render through statusBadge (Overdue is the derived danger state); the Stripe provenance is a fact row rendered only when Stripe is configured (maintainer, 2026-08-30: provenance is noise on a deployment with no provider). Reuses the member invoice-detail projection queries plus the operator-only organization and Stripe-mapping reads (loadOperatorInvoiceDetailData). The invoice's UUID sits on its own muted line beneath the wrapper's header rather than inline with the organization (design D14): it is an internal identifier, not part of the sentence a reader forms about who owes what. */}}
{{ .InvoiceID }}
{{ if .OrgName }} {{ .OrgName }} {{ else if .OrgID }} {{ .OrgID }} {{ end }}
{{ template "statusBadge" .StatusBadge }}Amount due
{{ .AmountDue }}
Amount paid
{{ .AmountPaid }}
Due date
{{ if .DueDate }}{{ .DueDate }}{{ else }}—{{ end }}
Paid date
{{ if .PaidAt }}{{ .PaidAt }}{{ else }}—{{ end }}
Stripe
{{ template "statusBadge" .SyncBadge }} {{ if .StripeInvoiceNumber }}{{ .StripeInvoiceNumber }}{{ end }} {{ if .StripeURL }}View in Stripe{{ end }}
Period: {{ .Period }}
{{ template "sectionHeader" .LineItemsHeader }} {{ if .Error }}| Description | Quantity | Amount | Period |
|---|---|---|---|
| {{ if .Description }}{{ .Description }}{{ else }}—{{ end }} | {{ .Quantity }} | {{ .Amount }} | {{ .Period }} |