Commit 66dea178 by Damien Moulard

in simplified household set household composition not required

parent 350ba5cd
......@@ -251,7 +251,7 @@ class AdherentAdmin extends AbstractAdmin
"Colocation" => "Colocation"
],
'label' => "Composition du foyer (pour information)",
'required' => true,
'required' => false,
'disabled' => $disableHouseholdAllowanceFields,
'attr' => [
'autocomplete' => 'off'
......@@ -313,10 +313,20 @@ class AdherentAdmin extends AbstractAdmin
->end();
}
$cotisSectionInfo = "";
if ($simplified_household_based_allowance && $this->tavCotisationUtils->getAppropriateAllocationMethod($adherent) == 'cotisation_profile') {
// Inform admin that this adherent cotisation method falls back to ProfilDeCotisation, as it has one defined and no household data yet defined
$cotisSectionInfo = $em->getRepository(GlobalParameter::class)->val(GlobalParameter::SSA_SIMPL_HOUSEHOLD_ADMIN_TEXT_INFO_ADHERENT_FALLBACKS_TO_PROFILECOTIS);
$cotisSectionInfo .= " " . $adherent->getProfilDeCotisation() . ".";
}
// Add cotisation info
$formMapper
->tab('General')
->with('Informations de cotisation', ['class' => 'col-md-5'])
->with('Informations de cotisation', [
'class' => 'col-md-5',
'description' => $cotisSectionInfo
])
->add('cotisationAmount', NumberType::class, [
'label' => 'Montant de la cotisation (en €)',
'help' => $simplified_household_based_allowance ? '' : 'Montant minimum : 10€ par foyer + 5€/personne supplémentaire du foyer',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment