{% extends 'admin/layout.html.twig' %} {% block title %}Documents comptables{% endblock %} {% block admin_body %} {% set actions=[] %}{% if can_permission('ACCOUNTING_DOCUMENT',2) %}{% set actions=[{label:'Ajouter une pièce',href:'#',icon:'bi-plus-lg',primary:true,attributes:{'data-bs-toggle':'modal','data-bs-target':'#docModal'}}] %}{% endif %} {% include 'admin/ui/_page_header.html.twig' with {page_eyebrow:'Comptabilité',page_title:'Documents comptables',page_subtitle:'Les pièces générées sont classées automatiquement. Ajoute seulement les documents reçus de l’extérieur.',page_actions:actions} only %}
{% if documentTree is empty %}
Aucune pièce comptable pour le moment.
{% else %}
{% for yearLabel, yearData in documentTree %}
{{ yearLabel }} {{ yearData.count }} pièce{{ yearData.count > 1 ? 's' : '' }}
{% for periodKey, periodData in yearData.periods %}
{{ periodData.label }} {{ periodData.count }}
{% for type, items in periodData.types %}
{{ typeLabels[type] ?? type|replace({'_':' '})|title }} {{ items|length }}
{% for l in items %} {% set context = l.artisticProject ? l.artisticProject.name : (l.financialAccount ? l.financialAccount.name : 'Association') %}
{{ l.document.name }}
{{ l.documentDate|date('d/m/Y') }} · {{ context }}
Voir
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
Aucune pièce ne correspond à cette recherche.
{% endif %}
{% if can_permission('ACCOUNTING_DOCUMENT',2) %} {% endif %} {% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}