Commit 7981826a by Damien Moulard

in ssa simplified housld mode, enable cotisation reminder by default

parent dc64330f
...@@ -144,6 +144,12 @@ class AdherentAdmin extends AbstractAdmin ...@@ -144,6 +144,12 @@ class AdherentAdmin extends AbstractAdmin
*/ */
protected function configureFormFields(FormMapper $formMapper): void protected function configureFormFields(FormMapper $formMapper): void
{ {
// params
$em = $this->getConfigurationPool()->getContainer()->get('doctrine')->getManager();
$tav_env = $this->getConfigurationPool()->getContainer()->getParameter('tav_env');
$household_based_allowance = $this->getConfigurationPool()->getContainer()->getParameter('household_based_allowance');
$simplified_household_based_allowance = $this->getConfigurationPool()->getContainer()->getParameter('simplified_household_based_allowance');
// Initialize adherent // Initialize adherent
$adherent = $this->getSubject(); $adherent = $this->getSubject();
$now = new \DateTime(); $now = new \DateTime();
...@@ -156,17 +162,16 @@ class AdherentAdmin extends AbstractAdmin ...@@ -156,17 +162,16 @@ class AdherentAdmin extends AbstractAdmin
$adherent->setEcompte(0); $adherent->setEcompte(0);
$user->setAdherent($adherent); $user->setAdherent($adherent);
$adherent->setUser($user); $adherent->setUser($user);
if ($simplified_household_based_allowance) {
$adherent->setMailRappelCotisation(true);
$adherent->setJourMailRappelCotisation(1);
}
} }
if (null == $adherent->getGeoloc()) { if (null == $adherent->getGeoloc()) {
$adherent->setGeoloc(new Geoloc()); $adherent->setGeoloc(new Geoloc());
} }
// params
$em = $this->getConfigurationPool()->getContainer()->get('doctrine')->getManager();
$tav_env = $this->getConfigurationPool()->getContainer()->getParameter('tav_env');
$household_based_allowance = $this->getConfigurationPool()->getContainer()->getParameter('household_based_allowance');
$simplified_household_based_allowance = $this->getConfigurationPool()->getContainer()->getParameter('simplified_household_based_allowance');
$formMapper $formMapper
->tab('General') ->tab('General')
->with('Identité', ['class' => 'col-md-7']) ->with('Identité', ['class' => 'col-md-7'])
......
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