Add refund badge to invoice lists (#3918)

* Add refund badge to invoice lists

* fix badge
This commit is contained in:
Andrew Camilleri
2022-07-01 06:26:00 +02:00
committed by GitHub
parent 4eabe91cee
commit 0970944ee4
9 changed files with 19 additions and 4 deletions

View File

@@ -826,6 +826,7 @@ namespace BTCPayServer.Controllers
invoiceQuery.StoreId = model.StoreIds;
invoiceQuery.Take = model.Count;
invoiceQuery.Skip = model.Skip;
invoiceQuery.IncludeRefunds = true;
var list = await _InvoiceRepository.GetInvoices(invoiceQuery);
model.IncludeArchived = invoiceQuery.IncludeArchived;
@@ -845,6 +846,7 @@ namespace BTCPayServer.Controllers
CanMarkInvalid = state.CanMarkInvalid(),
CanMarkSettled = state.CanMarkComplete(),
Details = InvoicePopulatePayments(invoice),
HasRefund = invoice.Refunds.Any(data => !data.PullPaymentData.Archived)
});
}
return View(model);