@model BTCPayServer.Models.InvoicingModels.InvoiceReceiptViewModel @using BTCPayServer.Client.Models @using BTCPayServer.Components.QRCode @using BTCPayServer.Services @inject DisplayFormatter DisplayFormatter @{ Layout = null; ViewData["Title"] = $"Receipt from {Model.StoreName}"; var isProcessing = Model.Status == InvoiceStatus.Processing; var isFreeInvoice = (Model.Status == InvoiceStatus.New && Model.Amount == 0); var isSettled = Model.Status == InvoiceStatus.Settled; } @ViewData["Title"] @* CSS *@ @if (isProcessing) { } else if (isFreeInvoice) { }
@if (isProcessing) {
The invoice has detected a payment but is still waiting to be settled.
} else if (!isSettled) {
The invoice is not settled.
} else {
@if (!string.IsNullOrEmpty(Model.OrderId)) {
Order ID: @Model.OrderId
} @Model.Timestamp.ToBrowserDate()
@if (Model.AdditionalData?.Any() is true && (Model.AdditionalData.ContainsKey("Cart") || Model.AdditionalData.ContainsKey("Discount") || Model.AdditionalData.ContainsKey("Tip"))) { @if (Model.AdditionalData.ContainsKey("Cart")) { @foreach (var (key, value) in (Dictionary)Model.AdditionalData["Cart"]) { } } @if (Model.AdditionalData.ContainsKey("Subtotal")) { } @if (Model.AdditionalData.ContainsKey("Discount")) { } @if (Model.AdditionalData.ContainsKey("Tip")) { } } @if (Model.Payments?.Any() is true) { @for (var i = 0; i < Model.Payments.Count; i++) { var payment = Model.Payments[i]; @if (Model.Payments.Count > 1) { } @if (!string.IsNullOrEmpty(payment.Destination)) { } @if (!string.IsNullOrEmpty(payment.PaymentProof)) { } } }
Total @DisplayFormatter.Currency(Model.Amount, Model.Currency, DisplayFormatter.CurrencyFormat.Symbol)

@key @value
Subtotal @Model.AdditionalData["Subtotal"]
Discount @Model.AdditionalData["Discount"]
Tip @Model.AdditionalData["Tip"]

Payment @(i + 1)
Received @payment.ReceivedDate.ToBrowserDate()
@(Model.Payments.Count == 1 ? "Paid" : "") @payment.AmountFormatted
@payment.PaidFormatted
Rate @payment.RateFormatted
Destination @payment.Destination
Pay Proof @payment.PaymentProof

if (Model.ReceiptOptions.ShowQR is true) { } }