style: display total due, paid, and remaining balance in adherents list
AS Talange CI/CD Pipeline / Build & Run Unit Tests (push) Successful in 2m54s
AS Talange CI/CD Pipeline / Build & Run in Docker Container (push) Successful in 3m5s

This commit is contained in:
2026-06-01 22:58:41 +02:00
parent aba4ed0770
commit 1a4ff6fdac
2 changed files with 39 additions and 4 deletions
@@ -83,6 +83,16 @@ public class Licence {
return reste.compareTo(BigDecimal.ZERO) < 0 ? BigDecimal.ZERO : reste;
}
@Transient
public BigDecimal getSommePayee() {
if (paiements == null || paiements.isEmpty()) {
return BigDecimal.ZERO;
}
return paiements.stream()
.map(Paiement::getMontant)
.reduce(BigDecimal.ZERO, BigDecimal::add);
}
// Getters and Setters
public Long getId() { return id; }