Commit fb315506 by Julien Jorry

Fix bug transfert adherent presta

parent 94c2f465
...@@ -6,10 +6,12 @@ use App\Entity\Adherent; ...@@ -6,10 +6,12 @@ use App\Entity\Adherent;
use App\Entity\Cotisation; use App\Entity\Cotisation;
use App\Entity\Geoloc; use App\Entity\Geoloc;
use App\Entity\TransactionAdherentAdherent; use App\Entity\TransactionAdherentAdherent;
use App\Entity\TransactionAdherentPrestataire;
use App\Entity\Usergroup; use App\Entity\Usergroup;
use App\Form\Type\AdherentInfosFormType; use App\Form\Type\AdherentInfosFormType;
use App\Form\Type\AdhererFormType; use App\Form\Type\AdhererFormType;
use App\Form\Type\TransactionAdherentAdherentFormType; use App\Form\Type\TransactionAdherentAdherentFormType;
use App\Form\Type\TransactionAdherentPrestataireFormType;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use FOS\UserBundle\Model\UserManagerInterface; use FOS\UserBundle\Model\UserManagerInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted;
...@@ -55,6 +57,7 @@ class UserAdherentController extends AbstractController ...@@ -55,6 +57,7 @@ class UserAdherentController extends AbstractController
{ {
$entity = new TransactionAdherentPrestataire(); $entity = new TransactionAdherentPrestataire();
$entity->setOperateur($this->getUser()); $entity->setOperateur($this->getUser());
$entity->setExpediteur($this->getUser()->getAdherent());
$form = $this->createForm(TransactionAdherentPrestataireFormType::class, $entity); $form = $this->createForm(TransactionAdherentPrestataireFormType::class, $entity);
$form->handleRequest($request); $form->handleRequest($request);
......
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