{% extends 'comptabilite/_layout.html.twig' %} {% block title %}Factures - {{ enfant.prenom }} {{ enfant.nom }}{% endblock %} {% block page_title %}Factures - {{ enfant.prenom }} {{ enfant.nom }}{% endblock %} {% block toolbar_actions %} Dossiers enfants {% endblock %} {% block body %} {% if soldeRetrait is not null %}

Solde de retrait

Total facturé : {{ soldeRetrait.totalFacture|montant }}
Total payé : {{ soldeRetrait.totalPaye|montant }}
Frais de préavis non remboursables : {{ soldeRetrait.fraisPreavis|montant }}
{% if soldeRetrait.solde > 0 %} Solde : {{ soldeRetrait.solde|montant }} - à rembourser à la famille (proposition, validation et exécution manuelles) {% else %} Solde : {{ soldeRetrait.solde|montant }} - reste dû par la famille {% endif %}

Remboursements

{% for remboursement in remboursements %}
{{ remboursement.montant|montant }} - {{ remboursement.motif }}
Saisi par {{ remboursement.saisiePar.prenom }} {{ remboursement.saisiePar.nom }} le {{ remboursement.dateSaisie|date('d/m/Y') }}
Statut : {% if remboursement.statut.value == 'en_attente' %} {{ remboursement.statut.label }} {% elseif remboursement.statut.value == 'valide' %} {{ remboursement.statut.label }} {% else %} {{ remboursement.statut.label }} {% endif %} {% if remboursement.valideePar %} par {{ remboursement.valideePar.prenom }} {{ remboursement.valideePar.nom }} le {{ remboursement.dateValidation|date('d/m/Y') }}{% endif %} {% if remboursement.motifRefus %} - motif : {{ remboursement.motifRefus }}{% endif %}
{% if remboursement.statut.value == 'en_attente' and is_granted('ROLE_DIRECTION') %}
{% endif %}
{% else %}
Aucun remboursement enregistré.
{% endfor %}
{% endif %}

Générer une facture

{% if contratActif is null %}
Aucun contrat actif pour cet enfant.
{% else %}

Contrat actif : {{ contratActif.modeFacturation.label }}{% if contratActif.ligneTarifaire %} - {{ contratActif.ligneTarifaire.libelle }}{% endif %}

{% endif %}

Échéancier de paiement en plusieurs tranches

{% if contratActif is null %}
Aucun contrat actif pour cet enfant.
{% else %}

Plan d'échéances distinct de la facturation régulière - ex. scolarité annuelle payée en plusieurs tranches datées.

{% if echeances is not empty %}
{% for ligne in echeances %}
{{ ligne.echeance.dateEcheance|date('d/m/Y') }} - {{ ligne.echeance.montant|montant }} {% if ligne.statut is null %} Non facturée {% elseif ligne.statut.value == 'payee' %} Facturée - payée {% elseif ligne.statut.value == 'partiellement_payee' %} Facturée - partiellement payée {% else %} Facturée - impayée {% endif %}
{% if ligne.statut is null %}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}

Historique

{% if historique is empty %}
Aucune facture.
{% else %} {% for ligne in historique %} {% set facture = ligne.facture %} {% set avoirActif = false %} {% for avoir in ligne.avoirs %} {% if avoir.statut.value in ['en_attente', 'valide'] %} {% set avoirActif = true %} {% endif %} {% endfor %}
{{ facture.numero }} - {{ facture.periodeDebut|date('d/m/Y') }} au {{ facture.periodeFin|date('d/m/Y') }} - {{ facture.montant|montant }} ({{ facture.libelle }}) - {{ facture.modeFacturation.label }} {% if ligne.estAnnulee %} Annulée {% else %} {{ ligne.statut.label }} {% if ligne.statut.value != 'payee' %} (restant dû : {{ ligne.montantRestant|montant }}){% endif %} {% endif %}
Télécharger {% if ligne.paiements is not empty %}
Paiements
{% for lignePaiement in ligne.paiements %} {% set paiement = lignePaiement.paiement %}
{{ paiement.datePaiement|date('d/m/Y') }} - {{ paiement.montant|montant }} - {{ paiement.modePaiement.label }}{% if paiement.commentaire %} ({{ paiement.commentaire }}){% endif %}
{% if lignePaiement.corrections is not empty %}
{% for correction in lignePaiement.corrections %}
Correction {{ correction.montantCorrectif|montant }} - {{ correction.motif }} - {% if correction.statut.value == 'en_attente' %} {{ correction.statut.label }} {% elseif correction.statut.value == 'valide' %} {{ correction.statut.label }} {% else %} {{ correction.statut.label }} {% endif %} {% if correction.valideePar %} par {{ correction.valideePar.prenom }} {{ correction.valideePar.nom }} le {{ correction.dateValidation|date('d/m/Y') }}{% endif %} {% if correction.motifRefus %} - motif du refus : {{ correction.motifRefus }}{% endif %}
{% if correction.statut.value == 'en_attente' and is_granted('ROLE_DIRECTION') %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %} {% if ligne.relances is not empty %}

Dernière relance envoyée le {{ ligne.relances|first.dateEnvoi|date('d/m/Y') }}.

{% endif %} {% if not ligne.estAnnulee and ligne.statut.value != 'payee' %}
Enregistrer un paiement
Relance
{% endif %} {% if ligne.avoirs is not empty %}
Annulation
{% for avoir in ligne.avoirs %}
{{ avoir.numero }} - {{ avoir.motif }} - {% if avoir.statut.value == 'en_attente' %} {{ avoir.statut.label }} {% elseif avoir.statut.value == 'valide' %} {{ avoir.statut.label }} {% else %} {{ avoir.statut.label }} {% endif %} {% if avoir.valideePar %} par {{ avoir.valideePar.prenom }} {{ avoir.valideePar.nom }} le {{ avoir.dateValidation|date('d/m/Y') }}{% endif %} {% if avoir.motifRefus %} - motif du refus : {{ avoir.motifRefus }}{% endif %}
{% if avoir.statut.value == 'en_attente' and is_granted('ROLE_DIRECTION') %}
{% endif %}
{% endfor %}
{% endif %} {% if not avoirActif %}
{% endif %}
{% endfor %} {% endif %}
{% endblock %}