Commit f1fb2b92 by Damien Moulard

fix export error in tav env

parent 37ab7708
...@@ -66,15 +66,19 @@ class CustomDoctrineORMQuerySourceIterator extends AbstractPropertySourceIterato ...@@ -66,15 +66,19 @@ class CustomDoctrineORMQuerySourceIterator extends AbstractPropertySourceIterato
} }
$data['Gestionnaires'] = implode(' - ', $gestionnaires); $data['Gestionnaires'] = implode(' - ', $gestionnaires);
$cotisEnd = $this->cotisationUtils->isCotisationValidForPresta($presta); $cotisEnd = $this->cotisationUtils->isCotisationValidForPresta($presta);
$cotisEnd = is_string($cotisEnd) ? new \DateTime( $cotisEnd ) : $cotisEnd;
$data['Cotisation à jour'] = false == $cotisEnd ? '' : ($cotisEnd->format('d/m/Y')); $data['Cotisation à jour'] = false == $cotisEnd ? '' : ($cotisEnd->format('d/m/Y'));
$firstCotis = $this->cotisationUtils->getFirstCotisationForPresta($presta); $firstCotis = $this->cotisationUtils->getFirstCotisationForPresta($presta);
$firstCotis = is_string($firstCotis) ? new \DateTime( $firstCotis ) : $firstCotis;
$data['Première Cotisation'] = false == $firstCotis ? '' : ($firstCotis->format('d/m/Y')); $data['Première Cotisation'] = false == $firstCotis ? '' : ($firstCotis->format('d/m/Y'));
} elseif (!empty($data['Id']) && !empty($data['Email'])) { } elseif (!empty($data['Id']) && !empty($data['Email'])) {
//adherent //adherent
$adherent = $this->em->getRepository(Adherent::class)->findOneById($data['Id']); $adherent = $this->em->getRepository(Adherent::class)->findOneById($data['Id']);
$cotisEnd = $this->cotisationUtils->isCotisationValidForAdherent($adherent); $cotisEnd = $this->cotisationUtils->isCotisationValidForAdherent($adherent);
$cotisEnd = is_string($cotisEnd) ? new \DateTime( $cotisEnd ) : $cotisEnd;
$data['Cotisation à jour'] = false == $cotisEnd ? '' : ($cotisEnd->format('d/m/Y')); $data['Cotisation à jour'] = false == $cotisEnd ? '' : ($cotisEnd->format('d/m/Y'));
$firstCotis = $this->cotisationUtils->getFirstCotisationForAdherent($adherent); $firstCotis = $this->cotisationUtils->getFirstCotisationForAdherent($adherent);
$firstCotis = is_string($firstCotis) ? new \DateTime( $firstCotis ) : $firstCotis;
$data['Première Cotisation'] = false == $firstCotis ? '' : ($firstCotis->format('d/m/Y')); $data['Première Cotisation'] = false == $firstCotis ? '' : ($firstCotis->format('d/m/Y'));
$adminRoles = ''; $adminRoles = '';
if (!empty($adherent->getUser())) { if (!empty($adherent->getUser())) {
......
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