Commit d0061807 by Damien Moulard

fix query to get adherents existing cotistions

parent c53a92cc
...@@ -171,10 +171,11 @@ class AdherentAdmin extends AbstractAdmin ...@@ -171,10 +171,11 @@ class AdherentAdmin extends AbstractAdmin
->tab('General') ->tab('General')
->with('Profil de cotisation', ['class' => 'col-md-5']) ->with('Profil de cotisation', ['class' => 'col-md-5'])
->add('profilDeCotisation', ChoiceType::class, [ ->add('profilDeCotisation', ChoiceType::class, [
'required' => false, 'required' => true,
'label' => 'Choix du profil : ', 'label' => 'Choix du profil :',
'choices' => $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(ProfilDeCotisation::class)->findAll(), 'choices' => $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(ProfilDeCotisation::class)->findAll(),
'empty_data' => null, 'empty_data' => null,
'placeholder' => 'Choisir un profil',
'choice_label' => function ($choice, $key, $value) { 'choice_label' => function ($choice, $key, $value) {
if (null === $choice) { if (null === $choice) {
return ''; return '';
......
...@@ -253,7 +253,7 @@ class FluxRepository extends ServiceEntityRepository ...@@ -253,7 +253,7 @@ class FluxRepository extends ServiceEntityRepository
WHERE f.type IN ('achat_monnaie_adherent', 'vente_emlc_adherent') WHERE f.type IN ('achat_monnaie_adherent', 'vente_emlc_adherent')
AND f.created_at >= :f AND f.created_at >= :f
AND f.created_at <= :t AND f.created_at <= :t
AND f.adherent_id = :adh_id"; AND (f.adherent_id = :adh_id OR f.adherent_dest_id = :adh_id)";
$statement = $this->connection->prepare($sqlQuery); $statement = $this->connection->prepare($sqlQuery);
$statement->bindValue(':f', $from); $statement->bindValue(':f', $from);
......
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