{% extends 'renter/index.html.twig' %} {% block sidebard %} {% endblock %} {% block dashboard_current %} {% endblock %} {% block dashboard_body %} {#

Facturation client "{{ customer.name }}" pour le mois courant

#}

renter/billing.html.twig

{% set finalTotalCurrentMonth = 0 %} {% set totalToPay = 0 %} {% set onGoing = 0 %} {% for r in rentals %} {% set finalTotalCurrentMonth = finalTotalCurrentMonth + r.totalCurrentMonth %} {% set totalToPay = totalToPay + r.toPay %} {% if r.ongoing %} {% set onGoing = onGoing + 1 %} {% endif %} {% endfor %}

Réservations

{{ rentals|length }}

En cours

{{ onGoing }}

Total Paye month

{{ finalTotalCurrentMonth - totalToPay }} €

Restant à payer

{{ totalToPay }} €

{% for r in rentals %} {% endfor %}
# Modèle Dates Montant Paiement Statut
{{ r.getRent.id }} {{ r.getRent.caro.carType.name }} {{ r.getRent.startDate|date("m/d/Y") }} {% if not r.getRent.isMonthlyRecurring %} - {{ r.getRent.endDate|date("m/d/Y") }} {% else %} Mensuel {% endif %} {{ r.getRent.price }} € {% if r.getRent.isMonthlyRecurring %} /mois {% endif %} {% if r.getRent.isMonthlyRecurring %} {% if r.toPay > 0 %} En attente du paiement de {{ r.toPay }} € {% else %} Payée ce mois {% endif %} {% else %} {% if r.getRent.isPaid %} Payée {% else %} {% if r.toPay > 0 %} En attente du paiement de {{ r.toPay }} € {% else %} Payée {% endif %} {% endif %} {% endif %} {% if r.ongoing%} En cours {% else %} Terminée {% endif %} {% if r.ongoing%} Détails {% endif %}
{% endblock %}