{# Partial: Structured SSA execution report (Bootstrap/AdminLTE) Expects a `report` array built by SsaReportService::buildReportData() - Texts are in French (user-facing) - Keys are in English (code-facing) #}
{# Informations générales #}

📊 Rapport d'exécution SSA

{% set general = report.general %}

Date {{ general.execution_date_display }}    Caisses actives {{ general.ssa_count }}    {% if general.is_simulation %} Mode simulation {% endif %}

{# Résumé global #}

📈 Résumé global

{% set s = report.summary %}
  • 📧 Rappels envoyés : {{ s.reminders_sent }} / {{ s.reminders_processed }}
  • 💳 Prélèvements : {{ s.takings_successful }} / {{ s.takings_processed }} ({{ s.takings_failed }} échecs)
  • 💰 Redistributions : {{ s.redistributions_paid }} / {{ s.redistributions_processed }}
{# Détails par caisse #} {% for ssa in report.perSsa %}

🏛️ {{ ssa.name }}

  • 👥 Participants : {{ ssa.participantCount }}
  • 👤 Personnes : {{ ssa.personCount }}
  • 💵 Total collecté : {{ ssa.totalCollected|number_format(2, ',', ' ') }} eMLCs
  • 📊 Commission appliquée : {{ ssa.commissionRate|number_format(1, ',', ' ') }}%
  • 💰 Montant/participant (avec comm.) : {{ ssa.amountPerParticipantWithCommission|number_format(2, ',', ' ') }} eMLCs
  • 💰 Montant/participant (sans comm.) : {{ ssa.amountPerParticipantWithoutCommission|number_format(2, ',', ' ') }} eMLCs
    {% if ssa.totalAmountOfAbound > 0 %}
  • ⬆️ Abondement nécessaire : {{ ssa.totalAmountOfAbound|number_format(2, ',', ' ') }} eMLCs
  • {% endif %}
  • 🏦 Total à payer manager : {{ ssa.totalAmountToPay|number_format(2, ',', ' ') }} eMLCs
  • 💼 Solde manager : {{ ssa.managerBalance|number_format(2, ',', ' ') }} eMLCs
  • ⚙️ Jour d'exécution : {{ ssa.config.execution_day }}
  • ⚙️ Rappels J- : {{ ssa.config.reminder_days }}
  • {% if ssa.config.can_auto_abound %}Abondement auto{% endif %} {% if ssa.config.can_autopay_with_ssa %}Paiement auto SSA{% endif %} {% if ssa.config.can_auto_complete_from_main %}Complément auto principal{% endif %}
{# Répartition par palier (tiers) #} {% if ssa.tiers is defined and ssa.tiers.enabled %}

👨‍👩‍👧‍👦 Répartition par palier (foyers)

{% for grp in ssa.tiers.groups %} {% endfor %}
Palier Foyers
{{ grp.label }} {{ grp.households }}
Non renseigné {{ ssa.tiers.unknown_household_items }}
{% endif %}
{% endfor %} {# Adhérents non prélevés #}

❌ Adhérents non prélevés ce mois-ci

{% if report.notTakenTotal == 0 %}

✅ Tous les adhérents éligibles ont été prélevés ce mois-ci.

{% else %} {% for ssaName, items in report.notTakenBySsa %} {% if items is not empty %}

🏛️ {{ ssaName }}

{% for it in items %} {% endfor %}
Adhérent Foyer Montant Date prélèvement Solde Raison
{{ it.adherentName }} {{ it.householdSize is not null and it.householdSize > 0 ? it.householdSize : '—' }} {{ it.amount|number_format(2, ',', ' ') }} € {{ it.paiementDate }} {{ it.balance|number_format(2, ',', ' ') }} € {{ it.reason }}
{% endif %} {% endfor %}

⚠️ Total : {{ report.notTakenTotal }} adhérent(s) non prélevé(s) ce mois-ci.

{% endif %}
{# Statistiques globales #}

💰 Statistiques de redistribution

{% set st = report.stats %}
  • 💵 Total collecté : {{ st.totalCollected|number_format(2, ',', ' ') }} eMLCs
  • 💰 Total à redistribuer : {{ st.totalToRedistribute|number_format(2, ',', ' ') }} eMLCs
  • 🏦 Total commissions : {{ st.totalCommission|number_format(2, ',', ' ') }} eMLCs
  • 👥 Total participants : {{ st.totalParticipants }}
  • {% if st.totalParticipants > 0 %}
  • 📊 Montant moyen/participant : {{ st.averagePerParticipant|number_format(2, ',', ' ') }} eMLCs
  • {% endif %} {% if st.totalCollected > 0 %}
  • 📈 Taux de commission global : {{ st.globalCommissionRate|number_format(2, ',', ' ') }}%
  • {% endif %}
{# Recommandations #}

💡 Recommandations

{% if report.recommendations is empty %}

✅ Aucune recommandation particulière. Le système fonctionne normalement.

{% else %}
    {% for rec in report.recommendations %}
  • {{ rec }}
  • {% endfor %}
{% endif %}