{% extends 'base.html.twig' %}
{% block title %}Mes souscriptions
{% endblock %}
{% block body %}
Mes souscriptions
{% if forfaitsWithPayments|length > 0 %}
{% for data in forfaitsWithPayments %}
{% set forfait = data.forfait %}
{% set totalPaid = data.totalPaid %}
{% set remaining = data.remaining %}
{% set percentage = data.paymentPercentage %}
{% set forfaitPayments = data.payments|default([]) %}
{{ forfait.nom }}
{{ forfait.prix|number_format(2, ',', ' ') }}
€
Progression du paiement
{{ percentage|round(1) }}%
{{ totalPaid|number_format(2, ',', ' ') }}
€
Payé
{{ remaining|number_format(2, ',', ' ') }}
€
Restant
{{ forfaitPayments|length }}
Paiements
{% if remaining <= 0 %}
Complet
{% elseif percentage >= 50 %}
Partiellement payé
{% else %}
Non payé
{% endif %}
{% if forfait.onlinePayLink is not empty %}
{% else %}
{% endif %}
{% if forfaitPayments|length > 0 %}
{% endif %}
{% endfor %}
Attention
Une fois vos paiements effectués, ils doivent être validés manuellement par un administrateur. Seulement alors seront-ils indiqués comme payés sur cette page ! Ce procédé étant manuel, il peut prendre un petit peu de temps.
Résumé
{% set totalForfaits = forfaitsWithPayments|length %}
{% set totalValue = 0 %}
{% set totalPaidGlobal = 0 %}
{% set soldedCount = 0 %}
{% for data in forfaitsWithPayments %}
{% set totalValue = totalValue + data.forfait.prix %}
{% set totalPaidGlobal = totalPaidGlobal + data.totalPaid %}
{% if data.remaining <= 0 %}
{% set soldedCount = soldedCount + 1 %}
{% endif %}
{% endfor %}
{{ totalForfaits }}
forfaits actifs
{{ soldedCount }}
forfaits soldés
{{ totalPaidGlobal|number_format(2, ',', ' ') }}
€
payés au total