PaymentVariantWindow: Warn user about negative credit exports
All checks were successful
Test / Run tests (push) Successful in 2m49s

This commit is contained in:
2025-01-21 09:27:04 +01:00
parent 5d017cc8ea
commit 7907c6cb56
2 changed files with 8 additions and 2 deletions

View File

@ -15,7 +15,7 @@ namespace Elwig.Models.Dtos {
public static IEnumerable<Transaction> FromPaymentVariant(PaymentVar variant) {
return variant.Credits
.Where(c => c.Member.Iban != null)
.Where(c => c.Member.Iban != null && c.Amount > 0)
.OrderBy(c => c.TgNr)
.Select(c => new Transaction(c))
.ToList();