From 9c5fde35f593e3c78415dbc6a6e6c0d03dd72998 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 20 Feb 2019 23:58:54 -0500 Subject: [PATCH] filter invoices --- src/Core/Services/Implementations/StripePaymentService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Core/Services/Implementations/StripePaymentService.cs b/src/Core/Services/Implementations/StripePaymentService.cs index 71a7d3f7c3..05fde6a18c 100644 --- a/src/Core/Services/Implementations/StripePaymentService.cs +++ b/src/Core/Services/Implementations/StripePaymentService.cs @@ -1053,10 +1053,10 @@ namespace Bit.Core.Services var invoices = await invoiceService.ListAsync(new InvoiceListOptions { CustomerId = customer.Id, - Limit = 20 + Limit = 50 }); - billingInfo.Invoices = invoices?.Data?.OrderByDescending(i => i.Date) - .Select(i => new BillingInfo.BillingInvoice(i)); + billingInfo.Invoices = invoices.Data.Where(i => i.Status != "void" && i.Status != "draft") + .OrderByDescending(i => i.Date).Select(i => new BillingInfo.BillingInvoice(i)); } }