Commit edad2048 by Julien Jorry

Add gestionnaires in presta export file

parent d54d8555
......@@ -59,6 +59,12 @@ class CustomDoctrineORMQuerySourceIterator extends AbstractPropertySourceIterato
if (!empty($data['Id']) && !empty($data['Raison'])) {
//presta
$presta = $this->em->getRepository(Prestataire::class)->findOneById($data['Id']);
$gestionnaires = [];
$users = $presta->getUsers();
foreach ($users as $user) {
$gestionnaires[] = $user->getLastname() . ' ' . $user->getFirstname() . ' (' . $user->getEmail() . ')';
}
$data['Gestionnaires'] = implode(' - ', $gestionnaires);
$cotisEnd = $this->cotisationUtils->isCotisationValidForPresta($presta);
$data['Cotisation à jour'] = false == $cotisEnd ? '' : ($cotisEnd->format('d/m/Y'));
$firstCotis = $this->cotisationUtils->getFirstCotisationForPresta($presta);
......
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