Remove CurrentRefund property in InvoiceData (#5494)

This commit is contained in:
Nicolas Dorier
2023-11-21 12:52:40 +09:00
committed by GitHub
parent d1bf47a5c0
commit 3ee4f43eb5
8 changed files with 43 additions and 32 deletions

View File

@@ -55,7 +55,8 @@ public class StoreNumbers : ViewComponent
.Where(p => p.PullPaymentData.StoreId == vm.Store.Id && !p.PullPaymentData.Archived && p.State == PayoutState.AwaitingApproval)
.CountAsync();
vm.RefundsIssued = await ctx.Invoices
.Where(i => i.StoreData.Id == vm.Store.Id && !i.Archived && i.CurrentRefundId != null && i.Created >= offset)
.Where(i => i.StoreData.Id == vm.Store.Id && !i.Archived && i.Created >= offset)
.SelectMany(i => i.Refunds)
.CountAsync();
return View(vm);