@using BTCPayServer.Client @using BTCPayServer.Client.Models @using BTCPayServer.Services @inject DisplayFormatter DisplayFormatter @inject PaymentMethodHandlerDictionary PaymentMethodHandlerDictionary @model InvoicesModel @{ ViewData.SetActivePage(InvoiceNavPages.Index, "Invoices"); var statusFilterCount = CountArrayFilter("status") + CountArrayFilter("exceptionstatus") + (HasBooleanFilter("includearchived") ? 1 : 0) + (HasBooleanFilter("unusual") ? 1 : 0); var hasDateFilter = HasArrayFilter("startdate") || HasArrayFilter("enddate"); var appFilterCount = Model.Apps.Count(app => HasArrayFilter("appid", app.Id)); } @functions { private int CountArrayFilter(string type) => Model.Search.ContainsFilter(type) ? Model.Search.GetFilterArray(type).Length : 0; private bool HasArrayFilter(string type, string key = null) => Model.Search.ContainsFilter(type) && (key is null || Model.Search.GetFilterArray(type).Contains(key)); private bool HasBooleanFilter(string key) => Model.Search.ContainsFilter(key) && Model.Search.GetFilterBool(key) is true; private bool HasCustomDateFilter() => Model.Search.ContainsFilter("startdate") && Model.Search.ContainsFilter("enddate"); } @section PageHeadContent { } @section PageFootContent { @*Without async, somehow selenium do not manage to click on links in this page*@ @* Custom Range Modal *@ } @Html.HiddenFor(a => a.Count)

Invoices are documents issued by the seller to a buyer to collect payment.

An invoice must be paid within a defined time interval at a fixed exchange rate to protect the issuer from price fluctuations.

You can also apply filters to your search by searching for filtername:value. Be sure to split your search parameters with comma. Supported filters are:

  • orderid:id for filtering a specific order
  • itemcode:code for filtering a specific type of item purchased through the pos or crowdfund apps
Learn More
@* Custom Range Modal *@
@if (Model.Apps.Any()) { }
@if (Model.Invoices.Any()) {
@foreach (var invoice in Model.Invoices) { }
Date
Order Id Invoice Id Status Amount Actions
@invoice.Date.ToBrowserDate() @invoice.InvoiceId
@if (invoice.Details.Archived) { archived } @if (invoice.CanMarkStatus) {
} else { @invoice.Status.Status.ToModernStatus().ToString() @if (invoice.Status.ExceptionStatus != InvoiceExceptionStatus.None) { @($"({invoice.Status.ExceptionStatus.ToString()})") } } @foreach (var paymentMethodId in invoice.Details.Payments.Select(payment => payment.GetPaymentMethodId()).Distinct()) { var image = PaymentMethodHandlerDictionary[paymentMethodId]?.GetCryptoImage(paymentMethodId); var badge = paymentMethodId.PaymentType.GetBadge(); if (!string.IsNullOrEmpty(image) || !string.IsNullOrEmpty(badge)) { @if (!string.IsNullOrEmpty(image)) { @paymentMethodId.PaymentType.ToString() } @if (!string.IsNullOrEmpty(badge)) { @badge } } } @if (invoice.HasRefund) { Refund }
@DisplayFormatter.Currency(invoice.Amount, invoice.Currency) @if (invoice.ShowCheckout) { Checkout [^] @if (!invoice.CanMarkStatus) { - } }   Details
} else {

There are no invoices matching your criteria.

}