Commit 92ee1955 by Julien Jorry

Fix admin : export reconversion + achat monnait + filters by groupe in operations...

parent 5ebef175
...@@ -253,7 +253,7 @@ jQuery(document).ready(function() { ...@@ -253,7 +253,7 @@ jQuery(document).ready(function() {
var form = this.closest('form') var form = this.closest('form')
// Set form moyen // Set form moyen
$('#' + form.name + '_moyen')[0].value = 'mlc' $('#' + form.name + '_moyen')[0].value = 'emlc'
if (form.checkValidity()) { if (form.checkValidity()) {
var div = '.confirmCotisation' var div = '.confirmCotisation'
......
...@@ -31,7 +31,10 @@ class AchatMonnaieAConfirmerAdmin extends AbstractAdmin ...@@ -31,7 +31,10 @@ class AchatMonnaieAConfirmerAdmin extends AbstractAdmin
protected $datagridValues = [ protected $datagridValues = [
'_sort_order' => 'DESC', '_sort_order' => 'DESC',
'_sort_by' => 'createdAt', '_sort_by' => 'createdAt',
'_per_page' => 100,
]; ];
protected $maxPerPage = 100;
protected $perPageOptions = [50, 100, 250, 500, 1000];
public function setSecurity(Security $security) public function setSecurity(Security $security)
{ {
...@@ -68,8 +71,8 @@ class AchatMonnaieAConfirmerAdmin extends AbstractAdmin ...@@ -68,8 +71,8 @@ class AchatMonnaieAConfirmerAdmin extends AbstractAdmin
'show_filter' => true, 'show_filter' => true,
]) ])
->add('createdAt', 'doctrine_orm_datetime_range', [ ->add('createdAt', 'doctrine_orm_datetime_range', [
'field_type'=> DateTimeRangePickerType::class, 'field_type' => DateTimeRangePickerType::class,
'label' => 'Date' 'label' => 'Date',
]) ])
; ;
} }
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace App\Admin; namespace App\Admin;
use App\Entity\Flux; use App\Entity\Flux;
use App\Entity\Groupe;
use App\Entity\Prestataire; use App\Entity\Prestataire;
use App\Entity\User; use App\Entity\User;
use App\Enum\MoyenEnum; use App\Enum\MoyenEnum;
...@@ -36,7 +37,10 @@ class CotisationAdmin extends AbstractAdmin ...@@ -36,7 +37,10 @@ class CotisationAdmin extends AbstractAdmin
protected $datagridValues = [ protected $datagridValues = [
'_sort_order' => 'DESC', '_sort_order' => 'DESC',
'_sort_by' => 'createdAt', '_sort_by' => 'createdAt',
'_per_page' => 250,
]; ];
protected $maxPerPage = 250;
protected $perPageOptions = [50, 100, 250, 500, 1000];
public function setSecurity(Security $security) public function setSecurity(Security $security)
{ {
...@@ -48,9 +52,37 @@ class CotisationAdmin extends AbstractAdmin ...@@ -48,9 +52,37 @@ class CotisationAdmin extends AbstractAdmin
*/ */
protected function configureDatagridFilters(DatagridMapper $datagridMapper): void protected function configureDatagridFilters(DatagridMapper $datagridMapper): void
{ {
$em = $this->getConfigurationPool()->getContainer()->get('doctrine')->getManager();
$datagridMapper $datagridMapper
->add('cotisationInfos.annee', null, ['label' => 'Année']) ->add('cotisationInfos.annee', null, ['label' => 'Année'])
->add('montant', null, ['label' => 'Montant']) ->add('montant', null, ['label' => 'Montant'])
->add('groupe', 'doctrine_orm_callback', [
'label' => 'Groupe local',
'callback' => function ($queryBuilder, $alias, $field, $value) {
if (!$value['value']) {
return;
}
$queryBuilder
->leftJoin('App\Entity\CotisationPrestataire', 'c', 'WITH', $alias . '.id = c.id')
->leftJoin('App\Entity\CotisationAdherent', 'ca', 'WITH', $alias . '.id = ca.id')
->leftJoin('c.expediteur', 'e')
->leftJoin('ca.expediteur', 'f')
->andWhere('e.groupe = :groupe OR f.groupe = :groupe')
->setParameter('groupe', $value['value']);
return true;
},
'advanced_filter' => false,
'show_filter' => true,
'field_type' => ChoiceType::class,
'field_options' => [
'choices' => $em->getRepository(Groupe::class)->findBy(['enabled' => true], ['name' => 'ASC']),
'choice_label' => 'name',
'placeholder' => 'Indifférent',
'expanded' => false,
'multiple' => false,
],
])
->add('cotisationInfos.recu', null, [ ->add('cotisationInfos.recu', null, [
'label' => 'Recu ?', 'label' => 'Recu ?',
'show_filter' => true, 'show_filter' => true,
...@@ -154,6 +186,9 @@ class CotisationAdmin extends AbstractAdmin ...@@ -154,6 +186,9 @@ class CotisationAdmin extends AbstractAdmin
->add('id', 'text', [ ->add('id', 'text', [
'template' => '@kohinos/bundles/SonataAdminBundle/Block/cotisation_obj.html.twig', 'template' => '@kohinos/bundles/SonataAdminBundle/Block/cotisation_obj.html.twig',
]) ])
->add('expediteur.groupe.name', null, [
'label' => 'Groupe',
])
->add('cotisationInfos.annee', null, [ ->add('cotisationInfos.annee', null, [
'label' => 'Année', 'label' => 'Année',
]) ])
...@@ -184,4 +219,30 @@ class CotisationAdmin extends AbstractAdmin ...@@ -184,4 +219,30 @@ class CotisationAdmin extends AbstractAdmin
]) ])
; ;
} }
public function getDataSourceIterator()
{
$iterator = parent::getDataSourceIterator();
$iterator->setDateTimeFormat('d/m/Y H:i:s'); //change this to suit your needs
return $iterator;
}
public function getExportFields()
{
return [
'Id' => 'expediteur',
'Groupe' => 'expediteur.groupe.name',
'Annee' => 'cotisationInfos.annee',
'Type' => 'type',
'Montant' => 'montant',
'Moyen' => 'moyen',
'Crée le' => 'cotisationInfos.debut',
'Expire le' => 'cotisationInfos.fin',
'Reçu ?' => 'cotisationInfos.recu',
'Operateur' => 'operateurAndRole',
'Reference' => 'reference',
'Date' => 'created_at',
];
}
} }
...@@ -26,7 +26,10 @@ class FluxAdmin extends AbstractAdmin ...@@ -26,7 +26,10 @@ class FluxAdmin extends AbstractAdmin
protected $datagridValues = [ protected $datagridValues = [
'_sort_order' => 'DESC', '_sort_order' => 'DESC',
'_sort_by' => 'createdAt', '_sort_by' => 'createdAt',
'_per_page' => 250,
]; ];
protected $maxPerPage = 250;
protected $perPageOptions = [50, 100, 250, 500, 1000];
public function setTranslator(TranslatorInterface $translator) public function setTranslator(TranslatorInterface $translator)
{ {
...@@ -141,24 +144,24 @@ class FluxAdmin extends AbstractAdmin ...@@ -141,24 +144,24 @@ class FluxAdmin extends AbstractAdmin
'show_filter' => true, 'show_filter' => true,
]) ])
->add('createdAt', 'doctrine_orm_datetime_range', [ ->add('createdAt', 'doctrine_orm_datetime_range', [
'field_type'=> DateTimeRangePickerType::class, 'field_type' => DateTimeRangePickerType::class,
'label' => 'Date' 'label' => 'Date',
]) ])
; ;
} }
public function getTemplate($name) public function getTemplate($name)
{ {
if ('list' == $name) { // if ('list' == $name) {
return '@kohinos/block/base_list_with_total.html.twig'; // return '@kohinos/block/base_list_with_total.html.twig';
} // }
return parent::getTemplate($name); return parent::getTemplate($name);
} }
public function getTotalLabel() public function getTotalLabel()
{ {
return $this->translator->trans('Total des flux :'); return $this->translator->trans('Total des flux');
} }
public function getTotal() public function getTotal()
...@@ -180,14 +183,14 @@ class FluxAdmin extends AbstractAdmin ...@@ -180,14 +183,14 @@ class FluxAdmin extends AbstractAdmin
public function getExportFields() public function getExportFields()
{ {
return [ return [
'Date' => 'created_at', 'Date' => 'created_at',
'Type' => 'type', 'Type' => 'type',
'Montant' => 'montant', 'Montant' => 'montant',
'Expediteur' => 'expediteur', 'Expediteur' => 'expediteur',
'Destinataire' => 'destinataire', 'Destinataire' => 'destinataire',
'Operateur' => 'operateur', 'Operateur' => 'operateur',
'Moyen' => 'moyen', 'Moyen' => 'moyen',
'Reference' => 'reference', 'Reference' => 'reference',
]; ];
} }
} }
...@@ -7,8 +7,6 @@ use App\Entity\Adherent; ...@@ -7,8 +7,6 @@ use App\Entity\Adherent;
use App\Entity\OperationAdherent; use App\Entity\OperationAdherent;
use Sonata\AdminBundle\Datagrid\DatagridMapper; use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Datagrid\ListMapper; use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Route\RouteCollection;
use Symfony\Component\Security\Core\Security;
/** /**
* Administration des operation des prestataires. * Administration des operation des prestataires.
...@@ -19,23 +17,6 @@ use Symfony\Component\Security\Core\Security; ...@@ -19,23 +17,6 @@ use Symfony\Component\Security\Core\Security;
*/ */
class OperationAdherentAdmin extends OperationAdmin class OperationAdherentAdmin extends OperationAdmin
{ {
protected $security;
protected $session;
protected $datagridValues = [
'_sort_order' => 'DESC',
'_sort_by' => 'createdAt',
];
public function setSecurity(Security $security)
{
$this->security = $security;
}
protected function configureRoutes(RouteCollection $collection)
{
$collection->clearExcept(['list', 'export']);
}
protected function configureListFields(ListMapper $listMapper) protected function configureListFields(ListMapper $listMapper)
{ {
$listMapper->add('account.accountableObject', null, ['label' => 'Compte adherent', 'template' => '@kohinos/bundles/SonataAdminBundle/Block/accountable.html.twig']); $listMapper->add('account.accountableObject', null, ['label' => 'Compte adherent', 'template' => '@kohinos/bundles/SonataAdminBundle/Block/accountable.html.twig']);
......
...@@ -27,7 +27,10 @@ class OperationAdmin extends AbstractAdmin ...@@ -27,7 +27,10 @@ class OperationAdmin extends AbstractAdmin
protected $datagridValues = [ protected $datagridValues = [
'_sort_order' => 'DESC', '_sort_order' => 'DESC',
'_sort_by' => 'createdAt', '_sort_by' => 'createdAt',
'_per_page' => 250,
]; ];
protected $maxPerPage = 250;
protected $perPageOptions = [50, 100, 250, 500, 1000];
public function setTranslator(TranslatorInterface $translator) public function setTranslator(TranslatorInterface $translator)
{ {
...@@ -56,7 +59,7 @@ class OperationAdmin extends AbstractAdmin ...@@ -56,7 +59,7 @@ class OperationAdmin extends AbstractAdmin
'Type' => 'flux.type', 'Type' => 'flux.type',
'Moyen' => 'flux.moyen', 'Moyen' => 'flux.moyen',
'Operateur' => 'flux.operateur', 'Operateur' => 'flux.operateur',
'Importé' => 'historical' 'Importé' => 'historical',
]; ];
} }
...@@ -104,7 +107,7 @@ class OperationAdmin extends AbstractAdmin ...@@ -104,7 +107,7 @@ class OperationAdmin extends AbstractAdmin
// public function getTotalLabel() // public function getTotalLabel()
// { // {
// return $this->translator->trans('Total des opérations :'); // return $this->translator->trans('Total des opérations');
// } // }
protected function configureDatagridFilters(DatagridMapper $datagridMapper): void protected function configureDatagridFilters(DatagridMapper $datagridMapper): void
...@@ -114,7 +117,7 @@ class OperationAdmin extends AbstractAdmin ...@@ -114,7 +117,7 @@ class OperationAdmin extends AbstractAdmin
->add('show_verify', CallbackFilter::class, [ ->add('show_verify', CallbackFilter::class, [
'label' => 'Vérifier la validité des flux', 'label' => 'Vérifier la validité des flux',
'advanced_filter' => false, 'advanced_filter' => false,
'show_filter' => true, 'show_filter' => false,
'field_type' => CheckboxType::class, 'field_type' => CheckboxType::class,
'callback' => static function (ProxyQueryInterface $query, string $alias, string $field, array $data): bool { 'callback' => static function (ProxyQueryInterface $query, string $alias, string $field, array $data): bool {
if (!$data['value']) { if (!$data['value']) {
...@@ -125,8 +128,8 @@ class OperationAdmin extends AbstractAdmin ...@@ -125,8 +128,8 @@ class OperationAdmin extends AbstractAdmin
}, },
]) ])
->add('createdAt', 'doctrine_orm_datetime_range', [ ->add('createdAt', 'doctrine_orm_datetime_range', [
'field_type'=> DateTimeRangePickerType::class, 'field_type' => DateTimeRangePickerType::class,
'label' => 'Date' 'label' => 'Date',
]) ])
; ;
} }
......
...@@ -7,8 +7,6 @@ use App\Entity\Comptoir; ...@@ -7,8 +7,6 @@ use App\Entity\Comptoir;
use App\Entity\OperationComptoir; use App\Entity\OperationComptoir;
use Sonata\AdminBundle\Datagrid\DatagridMapper; use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Datagrid\ListMapper; use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Route\RouteCollection;
use Symfony\Component\Security\Core\Security;
/** /**
* Administration des operation des comptoirs. * Administration des operation des comptoirs.
...@@ -19,23 +17,6 @@ use Symfony\Component\Security\Core\Security; ...@@ -19,23 +17,6 @@ use Symfony\Component\Security\Core\Security;
*/ */
class OperationComptoirAdmin extends OperationAdmin class OperationComptoirAdmin extends OperationAdmin
{ {
protected $security;
protected $session;
protected $datagridValues = [
'_sort_order' => 'DESC',
'_sort_by' => 'createdAt',
];
public function setSecurity(Security $security)
{
$this->security = $security;
}
protected function configureRoutes(RouteCollection $collection)
{
$collection->clearExcept(['list', 'export']);
}
protected function configureListFields(ListMapper $listMapper) protected function configureListFields(ListMapper $listMapper)
{ {
$listMapper->add('account.accountableObject', null, ['label' => 'Compte Comptoir', 'template' => '@kohinos/bundles/SonataAdminBundle/Block/accountable.html.twig']); $listMapper->add('account.accountableObject', null, ['label' => 'Compte Comptoir', 'template' => '@kohinos/bundles/SonataAdminBundle/Block/accountable.html.twig']);
......
...@@ -4,8 +4,6 @@ namespace App\Admin; ...@@ -4,8 +4,6 @@ namespace App\Admin;
use Sonata\AdminBundle\Datagrid\DatagridMapper; use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Datagrid\ListMapper; use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Route\RouteCollection;
use Symfony\Component\Security\Core\Security;
/** /**
* Administration des operation des groupes. * Administration des operation des groupes.
...@@ -16,23 +14,6 @@ use Symfony\Component\Security\Core\Security; ...@@ -16,23 +14,6 @@ use Symfony\Component\Security\Core\Security;
*/ */
class OperationGroupeAdmin extends OperationAdmin class OperationGroupeAdmin extends OperationAdmin
{ {
protected $security;
protected $session;
protected $datagridValues = [
'_sort_order' => 'DESC',
'_sort_by' => 'createdAt',
];
public function setSecurity(Security $security)
{
$this->security = $security;
}
protected function configureRoutes(RouteCollection $collection)
{
$collection->clearExcept(['list', 'export']);
}
protected function configureListFields(ListMapper $listMapper) protected function configureListFields(ListMapper $listMapper)
{ {
$listMapper->add('account.accountableObject', null, ['label' => 'Compte Groupe', 'template' => '@kohinos/bundles/SonataAdminBundle/Block/accountable.html.twig']); $listMapper->add('account.accountableObject', null, ['label' => 'Compte Groupe', 'template' => '@kohinos/bundles/SonataAdminBundle/Block/accountable.html.twig']);
......
...@@ -7,8 +7,6 @@ use App\Entity\OperationPrestataire; ...@@ -7,8 +7,6 @@ use App\Entity\OperationPrestataire;
use App\Entity\Prestataire; use App\Entity\Prestataire;
use Sonata\AdminBundle\Datagrid\DatagridMapper; use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Datagrid\ListMapper; use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Route\RouteCollection;
use Symfony\Component\Security\Core\Security;
/** /**
* Administration des operation des prestataires. * Administration des operation des prestataires.
...@@ -19,23 +17,6 @@ use Symfony\Component\Security\Core\Security; ...@@ -19,23 +17,6 @@ use Symfony\Component\Security\Core\Security;
*/ */
class OperationPrestataireAdmin extends OperationAdmin class OperationPrestataireAdmin extends OperationAdmin
{ {
protected $security;
protected $session;
protected $datagridValues = [
'_sort_order' => 'DESC',
'_sort_by' => 'createdAt',
];
public function setSecurity(Security $security)
{
$this->security = $security;
}
protected function configureRoutes(RouteCollection $collection)
{
$collection->clearExcept(['list', 'export']);
}
protected function configureListFields(ListMapper $listMapper) protected function configureListFields(ListMapper $listMapper)
{ {
$listMapper->add('account.accountableObject', null, ['label' => 'Compte prestataire', 'template' => '@kohinos/bundles/SonataAdminBundle/Block/accountable.html.twig']); $listMapper->add('account.accountableObject', null, ['label' => 'Compte prestataire', 'template' => '@kohinos/bundles/SonataAdminBundle/Block/accountable.html.twig']);
......
...@@ -5,9 +5,7 @@ namespace App\Admin; ...@@ -5,9 +5,7 @@ namespace App\Admin;
use App\Entity\Siege; use App\Entity\Siege;
use App\Enum\CurrencyEnum; use App\Enum\CurrencyEnum;
use Sonata\AdminBundle\Datagrid\DatagridMapper; use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Route\RouteCollection;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Security\Core\Security;
/** /**
* Administration des operation du siege. * Administration des operation du siege.
...@@ -18,23 +16,6 @@ use Symfony\Component\Security\Core\Security; ...@@ -18,23 +16,6 @@ use Symfony\Component\Security\Core\Security;
*/ */
class OperationSiegeAdmin extends OperationAdmin class OperationSiegeAdmin extends OperationAdmin
{ {
protected $security;
protected $session;
protected $datagridValues = [
'_sort_order' => 'DESC',
'_sort_by' => 'createdAt',
];
public function setSecurity(Security $security)
{
$this->security = $security;
}
protected function configureRoutes(RouteCollection $collection)
{
$collection->clearExcept(['list', 'export']);
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
...@@ -47,12 +28,14 @@ class OperationSiegeAdmin extends OperationAdmin ...@@ -47,12 +28,14 @@ class OperationSiegeAdmin extends OperationAdmin
if (!$value['value']) { if (!$value['value']) {
return; return;
} }
$queryBuilder $queryBuilder
->where($alias . '.currency = :type') ->andWhere($queryBuilder->expr()->in($alias . '.currency', ':types'))
->setParameter('type', $value['value']); ->setParameter('types', $value['value']);
return true; return true;
}, },
'label' => 'Devise',
'advanced_filter' => false, 'advanced_filter' => false,
'show_filter' => true, 'show_filter' => true,
'field_type' => ChoiceType::class, 'field_type' => ChoiceType::class,
...@@ -61,11 +44,11 @@ class OperationSiegeAdmin extends OperationAdmin ...@@ -61,11 +44,11 @@ class OperationSiegeAdmin extends OperationAdmin
'choice_label' => function ($choice) { 'choice_label' => function ($choice) {
return CurrencyEnum::getTypeName($choice); return CurrencyEnum::getTypeName($choice);
}, },
'empty_data' => CurrencyEnum::CURRENCY_EMLC, 'empty_data' => [CurrencyEnum::CURRENCY_EMLC],
'data' => CurrencyEnum::CURRENCY_EMLC, 'data' => [CurrencyEnum::CURRENCY_EMLC],
'placeholder' => false, 'placeholder' => false,
'expanded' => true, 'expanded' => true,
'multiple' => false, 'multiple' => true,
], ],
]) ])
; ;
......
...@@ -50,10 +50,8 @@ class ReconversionAdmin extends FluxAdmin ...@@ -50,10 +50,8 @@ class ReconversionAdmin extends FluxAdmin
unset($this->listModes['mosaic']); unset($this->listModes['mosaic']);
$listMapper $listMapper
->addIdentifier('createdAt', null, ['label' => 'Date']) ->addIdentifier('createdAt', null, ['label' => 'Date'])
->addIdentifier('type', null, ['label' => 'Type'])
->addIdentifier('operateur', User::class, ['label' => 'Operateur']) ->addIdentifier('operateur', User::class, ['label' => 'Operateur'])
->addIdentifier('expediteur', null, ['label' => 'Expediteur']) ->addIdentifier('expediteur', null, ['label' => 'Expediteur'])
->addIdentifier('destinataire', null, ['label' => 'Destinataire'])
->add('montant', 'decimal', ['label' => 'Montant initial', 'attributes' => ['fraction_digits' => 2]]) ->add('montant', 'decimal', ['label' => 'Montant initial', 'attributes' => ['fraction_digits' => 2]])
->add('tauxreconversionpercent', 'percent', ['label' => 'Taux reconversion']) ->add('tauxreconversionpercent', 'percent', ['label' => 'Taux reconversion'])
->add('montantareconvertir', 'decimal', ['label' => 'Montant à transférer', 'attributes' => ['fraction_digits' => 2]]) ->add('montantareconvertir', 'decimal', ['label' => 'Montant à transférer', 'attributes' => ['fraction_digits' => 2]])
...@@ -74,4 +72,28 @@ class ReconversionAdmin extends FluxAdmin ...@@ -74,4 +72,28 @@ class ReconversionAdmin extends FluxAdmin
->remove('operateur') ->remove('operateur')
; ;
} }
public function getDataSourceIterator()
{
$iterator = parent::getDataSourceIterator();
$iterator->setDateTimeFormat('d/m/Y H:i:s'); //change this to suit your needs
return $iterator;
}
public function getExportFields()
{
return [
'Date' => 'created_at',
'Operateur' => 'operateurAndRole',
'Expediteur' => 'expediteur',
'Montant' => 'montant',
'tauxreconversionpercent' => 'tauxreconversionpercent',
'montantareconvertir' => 'montantareconvertir',
'montantcommission' => 'montantcommission',
'montantcommission' => 'montantcommission',
'Reference' => 'reference',
'Reconverti ?' => 'reconverti',
];
}
} }
...@@ -40,7 +40,7 @@ class TransactionAdmin extends FluxAdmin ...@@ -40,7 +40,7 @@ class TransactionAdmin extends FluxAdmin
public function getTotalLabel() public function getTotalLabel()
{ {
return $this->translator->trans('Total des transactions :'); return $this->translator->trans('Total des transactions');
} }
public function getTotal() public function getTotal()
...@@ -105,8 +105,8 @@ class TransactionAdmin extends FluxAdmin ...@@ -105,8 +105,8 @@ class TransactionAdmin extends FluxAdmin
'show_filter' => true, 'show_filter' => true,
]) ])
->add('createdAt', 'doctrine_orm_datetime_range', [ ->add('createdAt', 'doctrine_orm_datetime_range', [
'field_type'=> DateTimeRangePickerType::class, 'field_type' => DateTimeRangePickerType::class,
'label' => 'Date' 'label' => 'Date',
]) ])
; ;
} }
......
...@@ -76,7 +76,7 @@ class TransfertAdmin extends FluxAdmin ...@@ -76,7 +76,7 @@ class TransfertAdmin extends FluxAdmin
->setParameter('ids', $ids) ->setParameter('ids', $ids)
; ;
} }
} else if ($this->security->isGranted('ROLE_COMPTOIR')) { } elseif ($this->security->isGranted('ROLE_COMPTOIR')) {
if (empty($this->getRequest()->getSession()->get('_comptoirgere'))) { if (empty($this->getRequest()->getSession()->get('_comptoirgere'))) {
$query->andWhere('false = true'); $query->andWhere('false = true');
} else { } else {
...@@ -101,7 +101,7 @@ class TransfertAdmin extends FluxAdmin ...@@ -101,7 +101,7 @@ class TransfertAdmin extends FluxAdmin
public function getTotalLabel() public function getTotalLabel()
{ {
return $this->translator->trans('Total des transferts :'); return $this->translator->trans('Total des transferts');
} }
public function getTotal() public function getTotal()
......
...@@ -35,6 +35,12 @@ ...@@ -35,6 +35,12 @@
</ul> </ul>
</div> </div>
</div> </div>
{% if admin.total is defined and admin.total > 0 %}
<div class="pull-left" style="margin: 5px 5px;">
<label for="{{ admin.uniqid }}_sum_of_orders" class="control-label">{{ admin.totalLabel is defined ? admin.totalLabel : (('Total'|trans))}} : </label>
<label class="control-label">{{ admin.total }}</label>
</div>
{% endif %}
{# {#
{% if block('pager_results') is not empty %} {% if block('pager_results') is not empty %}
&nbsp;-&nbsp; &nbsp;-&nbsp;
......
...@@ -260,4 +260,6 @@ Cotiser: Cotiser ...@@ -260,4 +260,6 @@ Cotiser: Cotiser
Cotisation: Cotisation Cotisation: Cotisation
'Votre adhésion a bien été prise en compte, bienvenue !': 'Votre adhésion a bien été prise en compte, bienvenue !' 'Votre adhésion a bien été prise en compte, bienvenue !': 'Votre adhésion a bien été prise en compte, bienvenue !'
'Décharger prestataire': 'Décharger prestataire' 'Décharger prestataire': 'Décharger prestataire'
invalid_message: 'Captcha invalide !' invalid_message: 'Captcha invalide !'
\ No newline at end of file Mlc: 'Monnaie papier'
Emlc: 'Monnaie numérique'
\ No newline at end of file
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