fix: apply maillot price and default selection for all new registrations
AS Talange CI/CD Pipeline - Production / Build & Run Unit Tests (push) Successful in 1m46s
AS Talange CI/CD Pipeline - Production / Deploy to Prod Environment (push) Successful in 2m38s

This commit is contained in:
2026-06-30 14:42:59 +02:00
parent 64ad4be7dd
commit 6ea00db0dc
2 changed files with 10 additions and 11 deletions
@@ -138,14 +138,13 @@ public class CategorieService {
newDotation.setLicence(licence);
newDotation.setEquipement(ce.getEquipement());
boolean isMaillot = "Maillot".equalsIgnoreCase(ce.getEquipement().getNom());
boolean isNouvelleAndU11 = false;
boolean isNouvelle = false;
if (licence.getTypeDemande() != null &&
(licence.getTypeDemande().equalsIgnoreCase("Nouvelle demande") || licence.getTypeDemande().equalsIgnoreCase("NOUVELLE")) &&
licence.getCategorie() != null &&
licence.getCategorie().isU11OrBelow()) {
isNouvelleAndU11 = true;
licence.getCategorie() != null) {
isNouvelle = true;
}
newDotation.setChoisi(ce.getObligatoire() || (isMaillot && isNouvelleAndU11)); // Checked if obligatoire or if it's a new registration for U11 or below
newDotation.setChoisi(ce.getObligatoire() || (isMaillot && isNouvelle)); // Checked if obligatoire or if it's a new registration
newDotation.setFourni(false);
newDotation.setTaille("");
newDotation.setNumero("");
@@ -133,9 +133,9 @@ public class PublicInscriptionController {
if (!categories.isEmpty()) {
Categorie cat = categories.get(0);
if (cat.getTarifBase() != null) {
BigDecimal prixMaillot = BigDecimal.ZERO;
if (cat.isU11OrBelow()) {
prixMaillot = cat.getEquipementPrixByNom("Maillot");
BigDecimal prixMaillot = cat.getEquipementPrixByNom("Maillot");
if (prixMaillot == null) {
prixMaillot = BigDecimal.ZERO;
}
BigDecimal tarifTotal = cat.getTarifBase().add(prixMaillot);
tarifStr = tarifTotal.intValue() + "";
@@ -175,9 +175,9 @@ public class PublicInscriptionController {
Categorie cat = categories.get(0);
if (cat.getTarifBase() != null) {
BigDecimal prixMaillot = BigDecimal.ZERO;
if (cat.isU11OrBelow()) {
prixMaillot = cat.getEquipementPrixByNom("Maillot");
BigDecimal prixMaillot = cat.getEquipementPrixByNom("Maillot");
if (prixMaillot == null) {
prixMaillot = BigDecimal.ZERO;
}
BigDecimal tarifTotal = cat.getTarifBase().add(prixMaillot);
return tarifTotal.intValue() + "";