{% extends 'base.html.twig' %} {% block stylesheets %} {% endblock %} {% block body %} {% if app.user.isOwner == true or app.user.agent == true %} {% else %}

Mes alertes du mois

{% endif %} {% if properties|length %} {% for property in properties %} {% for tenant in property.tenants %} {% for rent in tenant.rents %} {% if tenant.totalDebtTopay < 0 %}

Vous n'avez pas d'alerte.

{% endif %} {% endfor %} {% endfor %} {% endfor %} {% endif %}
{% if properties|length %} {% for property in properties %} {% set totalRent = 0 %} {% for tenant in property.tenants %} {% for rent in tenant.rents %} {% if rent.dateFocus|date('Y-m') == dateNow and tenant.totalDebtToPay > 0 %} {% set totalRent = totalRent + rent.amount %}

Propriétaire : {{ property.owner }}

Adresse : {{ property.street }} {% if property.streetAdd|length %} {{ property.streetAdd }} {% endif %} {{ property.zipCode }}, {{ property.city }}

Locataire: {{ tenant }}

Montant du loyer : {{ tenant.price }} €

Montant payé : {% if rent.dateFocus|date('Y-m') == dateNow %} {{ rent.amount }} € {% endif %}

Dette : {{ tenant.totalDebtToPay(tenant.getLastRentByDate(dateObject)) }} €

{% endif %} {% endfor %} {% endfor %} {% endfor %} {% endif %}
{% endblock %}