feat: implement global pricing model, optional equipment contribution, and bulk save for dotations

This commit is contained in:
2026-05-20 19:00:10 +02:00
parent 2a116b1e02
commit 1af0e177d5
12 changed files with 247 additions and 50 deletions
@@ -41,12 +41,7 @@ public class HomeController {
List<com.astalange.core.entity.Licence> allLicences = licenceRepository.findAll();
BigDecimal totalAttendu = allLicences.stream()
.map(lic -> {
if (lic.getCategorie() == null) return BigDecimal.ZERO;
return (lic.getAdherent() != null && lic.getAdherent().isResidentTalange())
? lic.getCategorie().getTarifBase()
: lic.getCategorie().getTarifExterieur();
})
.map(com.astalange.core.entity.Licence::getPrixTotal)
.reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal resteARecouvrer = totalAttendu.subtract(totalEncaisse);