feat: implement global pricing model, optional equipment contribution, and bulk save for dotations
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user