mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-26 07:23:06 +01:00
73 lines
2.2 KiB
Text
73 lines
2.2 KiB
Text
|
@model BTCPayServer.Models.InvoicingModels.InvoiceReceiptViewModel
|
||
|
@using BTCPayServer.Client.Models
|
||
|
@using BTCPayServer.Components.QRCode
|
||
|
@using BTCPayServer.Services
|
||
|
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||
|
@using BTCPayServer.Abstractions.TagHelpers
|
||
|
@inject DisplayFormatter DisplayFormatter
|
||
|
@{
|
||
|
Layout = null;
|
||
|
ViewData["Title"] = $"Receipt from {Model.StoreName}";
|
||
|
var isProcessing = Model.Status == InvoiceStatus.Processing;
|
||
|
var isSettled = Model.Status == InvoiceStatus.Settled;
|
||
|
}
|
||
|
|
||
|
<link href="~/main/bootstrap/bootstrap.css" asp-append-version="true" rel="stylesheet" />
|
||
|
<link href="~/main/site.css" asp-append-version="true" rel="stylesheet" />
|
||
|
|
||
|
|
||
|
<p class="text-center">@Model.StoreName</p>
|
||
|
<p class="text-center">@Model.Timestamp.ToBrowserDate()</p>
|
||
|
<p> </p>
|
||
|
|
||
|
@if (isProcessing)
|
||
|
{
|
||
|
<div class="lead text-center p-4 fw-semibold" id="invoice-processing">
|
||
|
The invoice has detected a payment but is still waiting to be settled.
|
||
|
</div>
|
||
|
}
|
||
|
else if (!isSettled)
|
||
|
{
|
||
|
<div class="lead text-center p-4 fw-semibold" id="invoice-unsettled">
|
||
|
The invoice is not settled.
|
||
|
</div>
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
<h3 class="text-center">
|
||
|
<strong>@DisplayFormatter.Currency(Model.Amount, Model.Currency, DisplayFormatter.CurrencyFormat.Symbol)</strong>
|
||
|
</h3>
|
||
|
|
||
|
@if (Model.Payments?.Any() is true)
|
||
|
{
|
||
|
<p> </p>
|
||
|
<p class="text-center"><strong>Payments</strong></p>
|
||
|
@foreach (var payment in Model.Payments)
|
||
|
{
|
||
|
<p> </p>
|
||
|
<p class="text-center">@payment.Amount <span class="text-nowrap">@payment.PaymentMethod</span></p>
|
||
|
<p class="text-center">Rate: @payment.RateFormatted</p>
|
||
|
<p class="text-center">= @payment.PaidFormatted</p>
|
||
|
}
|
||
|
}
|
||
|
if (Model.AdditionalData?.Any() is true)
|
||
|
{
|
||
|
<p> </p>
|
||
|
<p class="text-center"><strong>Additional Data</strong></p>
|
||
|
<partial name="PosData" model="(Model.AdditionalData, 1)"/>
|
||
|
}
|
||
|
|
||
|
@if (!string.IsNullOrEmpty(Model.OrderId))
|
||
|
{
|
||
|
<p> </p>
|
||
|
<p class="text-break">Order ID: @Model.OrderId</p>
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@if (Model.ReceiptOptions.ShowQR is true)
|
||
|
{
|
||
|
<vc:qr-code data="@Context.Request.GetCurrentUrl()"></vc:qr-code>
|
||
|
}
|
||
|
|
||
|
<script>window.print();</script>
|