Commit d0061807 by Damien Moulard

fix query to get adherents existing cotistions

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