2022-01-11 13:49:56 +01:00
|
|
|
@using BTCPayServer.Services.Invoices
|
2020-10-23 10:37:28 +02:00
|
|
|
@using BTCPayServer.Client.Models
|
2021-07-27 14:08:54 +02:00
|
|
|
@using BTCPayServer.Abstractions.Contracts
|
2020-10-23 10:37:28 +02:00
|
|
|
@model BTCPayServer.Models.PaymentRequestViewModels.ViewPaymentRequestViewModel
|
2019-03-24 01:10:16 +01:00
|
|
|
@addTagHelper *, BundlerMinifier.TagHelpers
|
2020-10-13 09:58:46 +02:00
|
|
|
@inject BTCPayServer.Services.BTCPayServerEnvironment env
|
2021-07-27 14:08:54 +02:00
|
|
|
@inject ISettingsRepository _settingsRepository
|
2019-01-14 22:43:29 +01:00
|
|
|
@{
|
|
|
|
ViewData["Title"] = Model.Title;
|
|
|
|
Layout = null;
|
2021-07-27 14:08:54 +02:00
|
|
|
var theme = await _settingsRepository.GetTheme();
|
2021-08-04 09:13:33 +02:00
|
|
|
string StatusClass(InvoiceState state)
|
2020-10-23 10:37:28 +02:00
|
|
|
{
|
2020-11-23 07:57:05 +01:00
|
|
|
switch (state.Status.ToModernStatus())
|
2020-10-23 10:37:28 +02:00
|
|
|
{
|
2020-11-23 07:57:05 +01:00
|
|
|
case InvoiceStatus.Settled:
|
|
|
|
case InvoiceStatus.Processing:
|
2021-08-04 09:13:33 +02:00
|
|
|
return "success";
|
2020-10-23 10:37:28 +02:00
|
|
|
case InvoiceStatus.Expired:
|
|
|
|
switch (state.ExceptionStatus)
|
|
|
|
{
|
|
|
|
case InvoiceExceptionStatus.PaidLate:
|
|
|
|
case InvoiceExceptionStatus.PaidPartial:
|
|
|
|
case InvoiceExceptionStatus.PaidOver:
|
2021-08-04 09:13:33 +02:00
|
|
|
return "warning";
|
2020-10-23 10:37:28 +02:00
|
|
|
default:
|
2021-08-04 09:13:33 +02:00
|
|
|
return "danger";
|
2020-10-23 10:37:28 +02:00
|
|
|
}
|
|
|
|
case InvoiceStatus.Invalid:
|
2021-08-04 09:13:33 +02:00
|
|
|
return "danger";
|
2020-10-23 10:37:28 +02:00
|
|
|
default:
|
2021-08-04 09:13:33 +02:00
|
|
|
return "warning";
|
2020-10-23 10:37:28 +02:00
|
|
|
}
|
|
|
|
}
|
2019-01-14 22:43:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
2020-10-13 09:58:46 +02:00
|
|
|
<html lang="en" @(env.IsDeveloping ? " data-devenv" : "")>
|
2019-01-14 22:43:29 +01:00
|
|
|
<head>
|
|
|
|
<title>@Model.Title</title>
|
2019-03-12 07:48:24 +01:00
|
|
|
<meta charset="utf-8" />
|
2020-10-13 09:58:46 +02:00
|
|
|
<meta name="robots" content="noindex,nofollow">
|
|
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
2019-01-14 22:43:29 +01:00
|
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
2021-09-03 09:16:36 +02:00
|
|
|
<bundle name="wwwroot/bundles/main-bundle.min.css" asp-append-version="true" />
|
2020-10-13 09:58:46 +02:00
|
|
|
<bundle name="wwwroot/bundles/payment-request-bundle.min.css" asp-append-version="true"></bundle>
|
2021-09-03 09:16:36 +02:00
|
|
|
<link href="@Context.Request.GetRelativePathOrAbsolute(theme.CssUri)" rel="stylesheet" asp-append-version="true"/>
|
2019-01-14 22:43:29 +01:00
|
|
|
@if (Model.CustomCSSLink != null)
|
|
|
|
{
|
2019-03-12 07:48:24 +01:00
|
|
|
<link href="@Model.CustomCSSLink" rel="stylesheet" />
|
2019-01-14 22:43:29 +01:00
|
|
|
}
|
2020-10-13 09:58:46 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
var srvModel = @Safe.Json(Model);
|
|
|
|
</script>
|
2022-03-11 08:41:48 +01:00
|
|
|
<script src="~/vendor/vuejs/vue.min.js" asp-append-version="true"></script>
|
2020-10-13 09:58:46 +02:00
|
|
|
<bundle name="wwwroot/bundles/payment-request-bundle.min.js" asp-append-version="true"></bundle>
|
|
|
|
@*We need to make sure btcpay.js is not bundled, else it will not work if there is a RootPath*@
|
|
|
|
<script src="~/modal/btcpay.js" asp-append-version="true"></script>
|
2019-08-21 16:04:25 +02:00
|
|
|
@Safe.Raw(Model.EmbeddedCSS)
|
2021-08-04 09:13:33 +02:00
|
|
|
<style>
|
|
|
|
.invoice { margin-top: var(--btcpay-space-s); }
|
|
|
|
.invoice + .invoice { margin-top: var(--btcpay-space-m); }
|
|
|
|
.invoice .badge { font-size: var(--btcpay-font-size-s); }
|
|
|
|
</style>
|
2020-09-28 15:13:55 +02:00
|
|
|
<noscript>
|
2020-10-13 09:58:46 +02:00
|
|
|
<style>
|
|
|
|
.hide-when-js, [v-cloak] { display: block !important; }
|
|
|
|
.only-for-js { display: none !important; }
|
|
|
|
</style>
|
2020-09-28 15:13:55 +02:00
|
|
|
</noscript>
|
2020-10-13 09:58:46 +02:00
|
|
|
</head>
|
2021-02-15 16:24:00 +01:00
|
|
|
<body>
|
|
|
|
<div id="app" class="min-vh-100 d-flex flex-column">
|
2021-12-11 04:32:23 +01:00
|
|
|
<nav class="btcpay-header navbar sticky-top py-3 py-lg-4 d-print-block">
|
2020-10-13 09:58:46 +02:00
|
|
|
<div class="container">
|
|
|
|
<div class="row align-items-center" style="width:calc(100% + 30px)">
|
|
|
|
<div class="col-12 col-md-8 col-lg-9">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col col-12 col-lg-8">
|
|
|
|
<h1 class="h3" v-text="srvModel.title">@Model.Title</h1>
|
|
|
|
</div>
|
|
|
|
<div class="col col-12 col-sm-6 col-lg-8 d-flex align-items-center">
|
|
|
|
<span class="text-muted text-nowrap">Last Updated</span>
|
|
|
|
|
2020-10-23 10:37:28 +02:00
|
|
|
<span class="text-nowrap d-print-none" v-text="lastUpdated" v-cloak>@Model.LastUpdated.ToString("g")</span>
|
|
|
|
<span class="text-nowrap d-none d-print-block" v-text="lastUpdatedDate">@Model.LastUpdated.ToString("g")</span>
|
2021-11-22 05:56:43 +01:00
|
|
|
<button type="button" class="btn btn-link fw-semibold d-none d-lg-inline-block d-print-none border-0 p-0 ms-4 only-for-js" v-on:click="window.print" v-cloak>
|
2020-10-13 09:58:46 +02:00
|
|
|
Print
|
|
|
|
</button>
|
2021-11-22 05:56:43 +01:00
|
|
|
<button type="button" class="btn btn-link fw-semibold d-none d-lg-inline-block d-print-none border-0 p-0 ms-4 only-for-js" v-on:click="window.copyUrlToClipboard" v-cloak>
|
2020-10-13 09:58:46 +02:00
|
|
|
Copy Link
|
|
|
|
</button>
|
|
|
|
</div>
|
2021-05-19 04:39:27 +02:00
|
|
|
<div class="col col-12 col-sm-6 text-sm-end col-lg-4 mt-lg-n4 pt-lg-1 d-print-none">
|
2020-10-13 09:58:46 +02:00
|
|
|
@if (Model.IsPending && !Model.Archived && Model.ExpiryDate.HasValue)
|
|
|
|
{
|
|
|
|
<noscript>@Model.Status</noscript>
|
|
|
|
}
|
|
|
|
<template v-if="srvModel.isPending && !srvModel.archived && endDiff">
|
|
|
|
<span class="text-muted">Expires in</span> {{endDiff}}
|
|
|
|
</template>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-10-23 10:37:28 +02:00
|
|
|
<div class="col-12 pt-3 pb-2 col-md-4 py-md-0 col-lg-3">
|
2020-10-13 09:58:46 +02:00
|
|
|
<noscript>
|
|
|
|
@if (Model.IsPending && !Model.Archived)
|
|
|
|
{
|
|
|
|
@if (Model.AllowCustomPaymentAmounts && !Model.AnyPendingInvoice)
|
|
|
|
{
|
2021-12-11 04:32:23 +01:00
|
|
|
<form method="get" asp-action="PayPaymentRequest" asp-route-payReqId="@Model.Id" class="d-print-none">
|
2020-10-13 09:58:46 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="col col-12 col-sm-6 col-md-12">
|
|
|
|
<div class="input-group">
|
2022-03-26 05:09:58 +01:00
|
|
|
<input type="number" inputmode="decimal" class="form-control text-end hide-number-spin" name="amount" value="@Model.AmountDue" @if (!Model.AllowCustomPaymentAmounts) { @("readonly") } max="@Model.AmountDue" step="any" placeholder="Amount" required />
|
2021-05-19 04:39:27 +02:00
|
|
|
<span class="input-group-text">@Model.Currency.ToUpper()</span>
|
2020-10-13 09:58:46 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col mt-2 col-12 col-sm-6 mt-sm-0 col-md-12 mt-md-2">
|
2021-08-31 08:07:54 +02:00
|
|
|
<button class="btn btn-primary w-100 text-nowrap" type="submit" data-test="pay-button">Pay Invoice</button>
|
2020-10-13 09:58:46 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2021-12-11 04:32:23 +01:00
|
|
|
<a class="btn btn-primary d-inline-block d-print-none w-100 text-nowrap @if (!(Model.AnyPendingInvoice && !Model.PendingInvoiceHasPayments)) { @("btn-lg") }" asp-action="PayPaymentRequest" asp-route-payReqId="@Model.Id" data-test="pay-button">
|
2020-10-13 09:58:46 +02:00
|
|
|
Pay Invoice
|
|
|
|
</a>
|
2021-09-17 03:24:48 +02:00
|
|
|
if (Model.AnyPendingInvoice && !Model.PendingInvoiceHasPayments && Model.AllowCustomPaymentAmounts)
|
2020-10-13 09:58:46 +02:00
|
|
|
{
|
2021-12-11 04:32:23 +01:00
|
|
|
<form method="get" asp-action="CancelUnpaidPendingInvoice" asp-route-payReqId="@Model.Id" class="mt-2 d-print-none">
|
2020-10-13 09:58:46 +02:00
|
|
|
<button class="btn btn-outline-secondary w-100 text-nowrap" type="submit">Cancel Invoice</button>
|
|
|
|
</form>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2021-05-19 04:39:27 +02:00
|
|
|
<div class="h2 text-md-end">
|
2021-08-31 08:07:54 +02:00
|
|
|
<span class="badge @if (Model.Status == "Settled") { @("bg-primary") } else if (Model.Status == "Expired") { @("bg-danger") } else { @("bg-info") }" data-test="status">
|
2020-10-13 09:58:46 +02:00
|
|
|
@Model.Status
|
|
|
|
@if (Model.Archived)
|
|
|
|
{
|
|
|
|
<span>(archived)</span>
|
|
|
|
}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
</noscript>
|
|
|
|
<template v-if="srvModel.isPending && !srvModel.archived" class="d-print-none">
|
|
|
|
<template v-if="srvModel.allowCustomPaymentAmounts && !srvModel.anyPendingInvoice">
|
2020-10-23 10:37:28 +02:00
|
|
|
<form v-on:submit="submitCustomAmountForm" class="d-print-none">
|
2020-10-13 09:58:46 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="col col-12 col-sm-6 col-md-12">
|
|
|
|
<div class="input-group">
|
2022-03-26 05:09:58 +01:00
|
|
|
<input type="number" inputmode="decimal" class="form-control text-end hide-number-spin" v-model="customAmount" :readonly="!srvModel.allowCustomPaymentAmounts" :max="srvModel.amountDue" placeholder="Amount" step="any" required />
|
2021-05-19 04:39:27 +02:00
|
|
|
<span class="input-group-text">{{currency}}</span>
|
2020-10-13 09:58:46 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col mt-2 col-12 col-sm-6 mt-sm-0 col-md-12 mt-md-2">
|
2021-08-31 08:07:54 +02:00
|
|
|
<button class="btn btn-primary w-100 d-flex d-print-none align-items-center justify-content-center text-nowrap" v-bind:class="{ 'btn-disabled': loading}" :disabled="loading" type="submit" data-test="pay-button">
|
2021-05-19 04:39:27 +02:00
|
|
|
<div v-if="loading" class="spinner-grow spinner-grow-sm me-2" role="status">
|
|
|
|
<span class="visually-hidden">Loading...</span>
|
2020-10-13 09:58:46 +02:00
|
|
|
</div>
|
|
|
|
Pay Invoice
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</template>
|
2019-01-14 22:43:29 +01:00
|
|
|
<template v-else>
|
2021-09-17 03:24:48 +02:00
|
|
|
<button class="btn btn-primary w-100 d-flex d-print-none align-items-center justify-content-center text-nowrap" :class="{ 'btn-lg': !(srvModel.anyPendingInvoice && !srvModel.pendingInvoiceHasPayments) || !srvModel.allowCustomPaymentAmounts}" v-on:click="pay(null)" :disabled="loading" data-test="pay-button">
|
2021-05-19 04:39:27 +02:00
|
|
|
<div v-if="loading" class="spinner-grow spinner-grow-sm me-2" role="status">
|
|
|
|
<span class="visually-hidden">Loading...</span>
|
2020-10-13 09:58:46 +02:00
|
|
|
</div>
|
|
|
|
<span>Pay Invoice</span>
|
|
|
|
</button>
|
2021-09-17 03:24:48 +02:00
|
|
|
@if (Model.AllowCustomPaymentAmounts) {
|
|
|
|
<button class="btn btn-outline-secondary mt-2 w-100 d-flex d-print-none align-items-center justify-content-center text-nowrap" v-if="srvModel.anyPendingInvoice && !srvModel.pendingInvoiceHasPayments" v-on:click="cancelPayment()" :disabled="loading">
|
|
|
|
<span v-if="loading" class="spinner-grow spinner-grow-sm me-2" role="status">
|
|
|
|
<span class="visually-hidden">Loading...</span>
|
|
|
|
</span>
|
|
|
|
<span>Cancel Invoice</span>
|
|
|
|
</button>
|
|
|
|
}
|
2019-01-14 22:43:29 +01:00
|
|
|
</template>
|
2020-10-13 09:58:46 +02:00
|
|
|
</template>
|
|
|
|
<template v-else>
|
2021-05-19 04:39:27 +02:00
|
|
|
<div class="h2 text-md-end">
|
2021-08-31 08:07:54 +02:00
|
|
|
<span class="badge" :class="{ 'bg-primary': srvModel.status === 'Settled', 'bg-danger': srvModel.status === 'Expired', 'bg-info': (srvModel.status !== 'Settled' && srvModel.status !== 'Expired') }" data-test="status">
|
2020-10-13 09:58:46 +02:00
|
|
|
{{srvModel.status}}
|
|
|
|
<span v-if="srvModel.archived">(archived)</span>
|
|
|
|
</span>
|
2019-01-14 22:43:29 +01:00
|
|
|
</div>
|
2020-10-13 09:58:46 +02:00
|
|
|
</template>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
<main class="flex-grow-1 py-4">
|
|
|
|
<div class="container">
|
2021-04-08 15:32:42 +02:00
|
|
|
<partial name="_StatusMessage" model="@(new ViewDataDictionary(ViewData){ { "Margin", "mb-4" } })" />
|
2020-10-13 09:58:46 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="col col-12 col-lg-6 mb-4">
|
2021-11-22 05:56:43 +01:00
|
|
|
<div class="bg-tile h-100 m-0 p-3 p-sm-5 rounded">
|
2020-10-13 09:58:46 +02:00
|
|
|
<h2 class="h4 mb-3">Invoice Summary</h2>
|
2021-11-22 05:56:43 +01:00
|
|
|
@if (!string.IsNullOrEmpty(Model.Description) && Model.Description != "<br>")
|
|
|
|
{
|
|
|
|
<div v-html="srvModel.description">
|
2020-10-13 09:58:46 +02:00
|
|
|
@Safe.Raw(Model.Description)
|
2021-11-22 05:56:43 +01:00
|
|
|
</div>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<p class="text-muted mt-3 mb-0">No details provided.</p>
|
|
|
|
}
|
2020-10-13 09:58:46 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col col-12 col-lg-6 mb-4">
|
2021-11-22 05:56:43 +01:00
|
|
|
<div class="bg-tile h-100 m-0 p-3 p-sm-5 rounded">
|
2020-10-13 09:58:46 +02:00
|
|
|
<h2 class="h4 mb-3">Payment Details</h2>
|
|
|
|
<dl class="mb-0 mt-md-4">
|
2021-05-19 04:39:27 +02:00
|
|
|
<div class="d-flex d-print-inline-block flex-column mb-4 me-5">
|
2021-11-22 05:56:43 +01:00
|
|
|
<dt class="h4 fw-semibold text-nowrap text-primary text-print-default order-2 order-sm-1 mb-1" v-text="srvModel.amountDueFormatted">@Model.AmountDueFormatted</dt>
|
|
|
|
<dd class="order-1 order-sm-2 mb-1" data-test="amount-due-title">Amount due</dd>
|
2020-10-13 09:58:46 +02:00
|
|
|
</div>
|
|
|
|
<div class="progress bg-light d-none d-sm-flex mb-sm-4 d-print-none" style="height:5px">
|
|
|
|
<div class="progress-bar bg-primary" role="progressbar" style="width:@((Model.AmountCollected/Model.Amount)*100)%" v-bind:style="{ width: (srvModel.amountCollected/srvModel.amount*100) + '%' }"></div>
|
|
|
|
</div>
|
2021-05-19 04:39:27 +02:00
|
|
|
<div class="d-flex d-print-inline-block flex-column mb-4 me-5 d-sm-inline-flex mb-sm-0">
|
2021-11-22 05:56:43 +01:00
|
|
|
<dt class="h4 fw-semibold text-nowrap order-2 order-sm-1 mb-1" v-text="srvModel.amountCollectedFormatted">@Model.AmountCollectedFormatted</dt>
|
|
|
|
<dd class="order-1 order-sm-2 mb-1">Amount paid</dd>
|
2020-10-13 09:58:46 +02:00
|
|
|
</div>
|
2021-05-19 04:39:27 +02:00
|
|
|
<div class="d-flex d-print-inline-block flex-column mb-0 d-sm-inline-flex float-sm-end">
|
2021-11-22 05:56:43 +01:00
|
|
|
<dt class="h4 text-sm-end fw-semibold text-nowrap order-2 order-sm-1 mb-1" v-text="srvModel.amountFormatted">@Model.AmountFormatted</dt>
|
|
|
|
<dd class="text-sm-end order-1 order-sm-2 mb-1">Total requested</dd>
|
2020-10-13 09:58:46 +02:00
|
|
|
</div>
|
|
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
2021-11-22 05:56:43 +01:00
|
|
|
<div class="bg-tile h-100 m-0 p-3 p-sm-5 rounded">
|
|
|
|
<h2 class="h4 mb-0">Payment History</h2>
|
2020-10-13 09:58:46 +02:00
|
|
|
<div class="table-responsive">
|
|
|
|
<noscript>
|
|
|
|
@if (Model.Invoices == null || !Model.Invoices.Any())
|
|
|
|
{
|
2021-11-22 05:56:43 +01:00
|
|
|
<p class="text-muted mt-3 mb-0">No payments made yet.</p>
|
2020-10-13 09:58:46 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2021-08-04 09:13:33 +02:00
|
|
|
@foreach (var invoice in Model.Invoices)
|
|
|
|
{
|
|
|
|
<table class="invoice table">
|
|
|
|
<thead>
|
|
|
|
<tr class="table-borderless">
|
|
|
|
<th class="fw-normal text-secondary w-350px" scope="col">Invoice Id</th>
|
|
|
|
<th class="fw-normal text-secondary w-175px">Expiry</th>
|
|
|
|
<th class="fw-normal text-secondary text-end w-125px">Amount</th>
|
|
|
|
<th class="fw-normal text-secondary text-end w-125px"></th>
|
|
|
|
<th class="fw-normal text-secondary text-end">Status</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr class="table-borderless table-light">
|
2020-10-13 09:58:46 +02:00
|
|
|
<td>@invoice.Id</td>
|
|
|
|
<td>@invoice.ExpiryDate.ToString("g")</td>
|
2021-05-19 04:39:27 +02:00
|
|
|
<td class="text-end">@invoice.AmountFormatted</td>
|
|
|
|
<td class="text-end"></td>
|
2021-08-04 09:13:33 +02:00
|
|
|
<td class="text-end text-print-default">
|
|
|
|
<span class="badge bg-@StatusClass(invoice.State)">@invoice.StateFormatted</span>
|
|
|
|
</td>
|
2020-10-13 09:58:46 +02:00
|
|
|
</tr>
|
2021-08-04 09:13:33 +02:00
|
|
|
@if (invoice.Payments != null && invoice.Payments.Any())
|
2020-10-13 09:58:46 +02:00
|
|
|
{
|
|
|
|
<tr class="table-borderless table-light">
|
2021-08-04 09:13:33 +02:00
|
|
|
<th class="fw-normal text-secondary">Destination</th>
|
2021-05-19 04:39:27 +02:00
|
|
|
<th class="fw-normal text-secondary">Received</th>
|
|
|
|
<th class="fw-normal text-secondary text-end">Paid</th>
|
|
|
|
<th class="fw-normal text-secondary text-end">Rate</th>
|
|
|
|
<th class="fw-normal text-secondary text-end">Payment</th>
|
2020-10-13 09:58:46 +02:00
|
|
|
</tr>
|
|
|
|
@foreach (var payment in invoice.Payments)
|
|
|
|
{
|
|
|
|
<tr class="table-borderless table-light">
|
2021-08-04 09:13:33 +02:00
|
|
|
<td class="text-break"><code>@payment.Destination</code></td>
|
|
|
|
<td>@payment.ReceivedDate.ToString("g")</td>
|
|
|
|
<td class="text-end">@payment.PaidFormatted</td>
|
|
|
|
<td class="text-end">@payment.RateFormatted</td>
|
|
|
|
<td class="text-end text-nowrap">@payment.Amount @payment.PaymentMethod</td>
|
|
|
|
</tr>
|
|
|
|
<tr class="table-borderless table-light">
|
|
|
|
<td class="fw-normal" colspan="5">
|
|
|
|
<span class="text-secondary">Transaction Id:</span>
|
2020-10-13 09:58:46 +02:00
|
|
|
@if (!string.IsNullOrEmpty(payment.Link))
|
|
|
|
{
|
2021-08-04 09:13:33 +02:00
|
|
|
<a href="@payment.Link" class="text-print-default text-break" rel="noreferrer noopener" target="_blank">@payment.Id</a>
|
2020-10-13 09:58:46 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2021-08-04 09:13:33 +02:00
|
|
|
<span class="text-break">@payment.Id</span>
|
2020-10-13 09:58:46 +02:00
|
|
|
}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
}
|
|
|
|
}
|
2021-08-04 09:13:33 +02:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
}
|
2020-10-13 09:58:46 +02:00
|
|
|
}
|
|
|
|
</noscript>
|
|
|
|
|
|
|
|
<template v-if="!srvModel.invoices || srvModel.invoices.length == 0">
|
2021-11-22 05:56:43 +01:00
|
|
|
<p class="text-muted mt-3 mb-0">No payments made yet.</p>
|
2020-10-13 09:58:46 +02:00
|
|
|
</template>
|
2020-10-23 10:37:28 +02:00
|
|
|
<template v-else>
|
2021-08-04 09:13:33 +02:00
|
|
|
<table v-for="invoice of srvModel.invoices" :key="invoice.id" class="invoice table">
|
2020-09-30 12:08:39 +02:00
|
|
|
<thead>
|
2020-10-13 09:58:46 +02:00
|
|
|
<tr class="table-borderless">
|
2021-08-04 09:13:33 +02:00
|
|
|
<th class="fw-normal text-secondary w-350px" scope="col">Invoice Id</th>
|
2021-05-19 04:39:27 +02:00
|
|
|
<th class="fw-normal text-secondary w-175px">Expiry</th>
|
|
|
|
<th class="fw-normal text-secondary text-end w-125px">Amount</th>
|
|
|
|
<th class="fw-normal text-secondary text-end w-125px"></th>
|
|
|
|
<th class="fw-normal text-secondary text-end">Status</th>
|
2020-10-13 09:58:46 +02:00
|
|
|
</tr>
|
2020-09-30 12:08:39 +02:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2021-08-04 09:13:33 +02:00
|
|
|
<tr class="table-borderless table-light">
|
|
|
|
<td>{{invoice.id}}</td>
|
|
|
|
<td v-text="formatDate(invoice.expiryDate)"></td>
|
|
|
|
<td class="text-end">{{invoice.amountFormatted}}</td>
|
|
|
|
<td class="text-end"></td>
|
|
|
|
<td class="text-end text-print-default">
|
|
|
|
<span class="badge" :class="`bg-${statusClass(invoice.stateFormatted)}`">{{invoice.stateFormatted}}</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<template v-if="invoice.payments && invoice.payments.length > 0">
|
|
|
|
<tr class="table-borderless table-light">
|
|
|
|
<th class="fw-normal text-secondary">Destination</th>
|
|
|
|
<th class="fw-normal text-secondary">Received</th>
|
|
|
|
<th class="fw-normal text-secondary text-end">Paid</th>
|
|
|
|
<th class="fw-normal text-secondary text-end">Rate</th>
|
|
|
|
<th class="fw-normal text-secondary text-end">Payment</th>
|
2020-10-13 09:58:46 +02:00
|
|
|
</tr>
|
2021-08-04 09:13:33 +02:00
|
|
|
<template v-for="payment of invoice.payments">
|
2020-10-23 10:37:28 +02:00
|
|
|
<tr class="table-borderless table-light">
|
2021-08-04 09:13:33 +02:00
|
|
|
<td class="text-break"><code>{{payment.destination}}</code></td>
|
2020-10-23 10:37:28 +02:00
|
|
|
<td v-text="formatDate(payment.receivedDate)"></td>
|
2021-05-19 04:39:27 +02:00
|
|
|
<td class="text-end">{{payment.paidFormatted}}</td>
|
|
|
|
<td class="text-end">{{payment.rateFormatted}}</td>
|
|
|
|
<td class="text-end text-nowrap">{{payment.amount.noExponents()}} {{payment.paymentMethod}}</td>
|
2020-10-23 10:37:28 +02:00
|
|
|
</tr>
|
2021-08-04 09:13:33 +02:00
|
|
|
<tr class="table-borderless table-light">
|
|
|
|
<td class="fw-normal" colspan="5">
|
|
|
|
<span class="text-secondary">Transaction Id:</span>
|
|
|
|
<a v-if="payment.link" :href="payment.link" class="text-print-default" target="_blank" rel="noreferrer noopener">{{payment.id}}</a>
|
|
|
|
<span v-else>{{payment.id}}</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2020-10-23 10:37:28 +02:00
|
|
|
</template>
|
2020-10-13 09:58:46 +02:00
|
|
|
</template>
|
2020-09-30 12:08:39 +02:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2020-10-13 09:58:46 +02:00
|
|
|
</template>
|
2019-01-14 22:43:29 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-10-13 09:58:46 +02:00
|
|
|
</main>
|
|
|
|
<footer class="pt-2 pb-4 d-print-none">
|
|
|
|
<div class="container text-center">
|
2021-07-06 10:35:42 +02:00
|
|
|
Powered by <a href="https://btcpayserver.org" target="_blank" rel="noreferrer noopener">BTCPay Server</a>
|
2020-10-13 09:58:46 +02:00
|
|
|
</div>
|
|
|
|
</footer>
|
2019-01-14 22:43:29 +01:00
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|