Commit 9c84fad2 by Yvon Kerdoncuff

add address to adherent and presta exports

parent 4c2b3755
......@@ -82,6 +82,13 @@ class CustomDoctrineORMQuerySourceIterator extends AbstractPropertySourceIterato
$firstCotis = $this->cotisationUtils->getFirstCotisationForPresta($presta);
$firstCotis = is_string($firstCotis) ? new \DateTime( $firstCotis ) : $firstCotis;
$data['Première Cotisation'] = false == $firstCotis ? '' : ($firstCotis->format('d/m/Y'));
if ($this->container->getParameter('tav_env')) {
$adresses = [];
foreach ($presta->getGeolocs() as $geoloc) {
$adresses[] = $geoloc ? $geoloc->getFullAddresse() : "";
}
$data['Adresses'] = implode(' - ', $adresses);
}
} elseif (!empty($data['Id']) && !empty($data['Email'])) {
//adherent
$adherent = $this->em->getRepository(Adherent::class)->findOneById($data['Id']);
......@@ -111,6 +118,7 @@ class CustomDoctrineORMQuerySourceIterator extends AbstractPropertySourceIterato
if ($this->container->getParameter('ccas_mode')) {
$data['Numéro d\'anonymisation'] = $adherent->getAnonymousToken();
}
$data["Adresse"] = (string) ($adherent->getGeoloc() ?: '');
} else {
$cotisEnd = $this->cotisationUtils->isCotisationValidForAdherent($adherent);
$cotisEnd = is_string($cotisEnd) ? new \DateTime( $cotisEnd ) : $cotisEnd;
......
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