Commit e0efb776 by Félicie

balance better

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