Commit cf535c67 by Julien Jorry

Fix cotisation en emlc

parent 7cb44111
......@@ -58,7 +58,7 @@ class UserController extends AbstractController
if ($form->isSubmitted()) {
$cotisation = $form->getData();
if ($form->isValid()) {
if (MoyenEnum::MOYEN_MLC == $cotisation->getMoyen()) {
if (MoyenEnum::MOYEN_EMLC == $cotisation->getMoyen()) {
try {
$cotisation->setRecu(true);
$this->operationUtils->executeOperations($cotisation);
......
......@@ -41,6 +41,7 @@ class UserPrestataireController extends FluxController
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$errorText = '';
foreach ($originalAdresses as $adresse) {
if (false === $presta->getGeolocs()->contains($adresse)) {
$adresse->getPrestataires()->removeElement($presta);
......@@ -59,7 +60,6 @@ class UserPrestataireController extends FluxController
$emailConstraint
);
}
$errorText = '';
foreach ($errors as $error) {
if ($error->count()) {
$errorText .= $error[0]->getMessage();
......
......@@ -26,16 +26,20 @@
{% endif %}
</ul>
{% if ((app.user and is_granted('ROLE_ADHERENT') and app.user.adherent) or (app.user and is_granted('ROLE_PRESTATAIRE') and app.session.has('_prestagere'))) %}
{% if false != isCotisationValid(app.user) %}
<span class='btn btn-secondary disabled mt-2' disabled='disabled'>
{{ 'Votre cotisation est à jour'|trans }}
</span>
{% else %}
<a class='btn btn-xs btn-primary mt-2' href='{{ path('cotiser') }}'>
{{ 'Cotiser'|trans }}
</a>
{% endif %}
{% set cotisEnd = false %}
{% if (app.user and is_granted('ROLE_ADHERENT') and app.user.adherent) %}
{% set cotisEnd = isCotisationValidForAdherent(app.user.adherent) %}
{% elseif (app.user and is_granted('ROLE_PRESTATAIRE') and app.session.has('_prestagere')) %}
{% set cotisEnd = isCotisationValidForPresta(app.session.get('_prestagere')) %}
{% endif %}
{% if false != cotisEnd %}
<span class='btn btn-secondary disabled mt-2' disabled='disabled'>
{{ 'Votre cotisation est à jour'|trans }}
</span>
{% else %}
<a class='btn btn-xs btn-primary mt-2' href='{{ path('cotiser') }}'>
{{ 'Cotiser'|trans }}
</a>
{% endif %}
{% endblock blockcontent %}
{% endif %}
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