Commit 196a95ba by Damien Moulard

add external data to adherents export

parent 8c015025
......@@ -1047,6 +1047,12 @@ class AdherentAdmin extends AbstractAdmin
$fields["Montant d'allocation"] = 'allocationAmount';
$fields["Solde e-MonA"] = 'emlcAccount.balance';
}
if ($this->getConfigurationPool()->getContainer()->getParameter('use_external_data')) {
$fields["Cohorte"] = 'externalData.cohort';
$fields["ID externe"] = 'externalData.external_id';
$fields["Données datées"] = 'externalDatedDataCollection';
}
return $fields;
}
......
......@@ -104,4 +104,22 @@ class ExternalAdherentDatedData
{
return $this->monthlyIncome;
}
public function __toString(): string
{
$incomes = [];
if ($this->getMonthlyIncome() != null) {
$incomes[] = "mensuels : " . $this->getMonthlyIncome() . "€";
}
if ($this->getAnnualIncome() != null) {
$incomes[] = "annuels : " . $this->getAnnualIncome() . "€";
}
if (count($incomes) > 0) {
return "Année " . $this->getYear() . " : Revenus " . join(" / ", $incomes);
} else {
return "";
}
}
}
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