Commit e0efb776 by Félicie

balance better

parent fade8390
...@@ -6,6 +6,7 @@ use App\Entity\AccountAdherent; ...@@ -6,6 +6,7 @@ use App\Entity\AccountAdherent;
use App\Entity\Adherent; use App\Entity\Adherent;
use App\Entity\CotisationAdherent; use App\Entity\CotisationAdherent;
use App\Entity\Geoloc; use App\Entity\Geoloc;
use App\Entity\GlobalParameter;
use App\Entity\Groupe; use App\Entity\Groupe;
use App\Entity\User; use App\Entity\User;
use App\Entity\Usergroup; use App\Entity\Usergroup;
...@@ -188,14 +189,16 @@ class AdherentAdmin extends AbstractAdmin ...@@ -188,14 +189,16 @@ class AdherentAdmin extends AbstractAdmin
->end(); ->end();
if (!empty($adherent) && !empty($adherent->getEmlcAccount()) ) { if (!empty($adherent) && !empty($adherent->getEmlcAccount()) ) {
$em = $this->getConfigurationPool()->getContainer()->get('doctrine')->getManager();
$balance = $adherent->getEmlcAccount()->getBalance(); $balance = $adherent->getEmlcAccount()->getBalance();
$mlc = $em->getRepository(GlobalParameter::class)->val(GlobalParameter::MLC_SYMBOL);
$formMapper $formMapper
->tab('General') ->tab('General')
->with('Solde', ['class' => 'col-md-5']) ->with('Solde', ['class' => 'col-md-7'])
->add('idmlc', TextType::class, [ ->add('idmlc', TextType::class, [
'disabled' => true, 'disabled' => true,
'label' => 'Solde e-mac : ', 'label' => 'Solde e-' . $mlc . ' :',
'data' => $balance . ' emac']) 'data' => $balance . ' ' . $mlc])
->end() ->end()
->end(); ->end();
} }
......
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