1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-12 08:38:13 -05:00

filter invoices

This commit is contained in:
Kyle Spearrin 2019-02-20 23:58:54 -05:00
parent 01d324a8b4
commit 9c5fde35f5

View File

@ -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));
}
}