{% extends '@Commercial/commercial/layout.html.twig' %} {% block commercial_title %}Dépenses fournisseurs{% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block commercial_content %}

Dépenses fournisseurs

Suivez les coûts externes et leur ventilation sur les projets.

{% set cards = [ {label: 'Total période', value: kpis.total|number_format(2, ',', ' ') ~ ' €', detail: kpis.count ~ ' dépense' ~ (kpis.count > 1 ? 's' : ''), icon: 'ti-receipt', tone: 'indigo'}, {label: 'Validées', value: kpis.completedTotal|number_format(2, ',', ' ') ~ ' €', detail: kpis.completedCount ~ ' validée' ~ (kpis.completedCount > 1 ? 's' : ''), icon: 'ti-check', tone: 'green'}, {label: 'Non ventilées', value: kpis.unallocatedTotal|number_format(2, ',', ' ') ~ ' €', detail: kpis.unallocatedCount ~ ' dépense' ~ (kpis.unallocatedCount > 1 ? 's' : ''), icon: 'ti-refresh-alert', tone: 'violet'}, {label: 'Sans justificatif', value: kpis.withoutAttachmentCount ~ ' dépense' ~ (kpis.withoutAttachmentCount > 1 ? 's' : ''), detail: 'À régulariser', icon: 'ti-alert-triangle', tone: 'orange'}, {label: 'À traiter', value: kpis.pendingTotal|number_format(2, ',', ' ') ~ ' €', detail: kpis.pendingCount ~ ' en attente', icon: 'ti-clock-filled', tone: 'red'} ] %} {% for card in cards %}
{{ card.label }} {{ card.value }} {{ card.detail }}
{% endfor %}
Du
Au
0 dépense(s) sélectionnée(s)
{% for expense in expenses %} {% set supplier_name = expense.fournisseur.nom|default('Sans fournisseur') %} {% set category_name = expense.categorie.nom|default('Sans catégorie') %} {% set has_attachment = expense.relativePath or expense.document %} {% set allocation_status = expense.allocationStatus %} {% set is_paid = expense.status == 'paid' %} {% set is_complete = expense.status in ['validated', 'paid'] %} {% set vat_rate = expense.montanHt ? (expense.montantTaxe / expense.montanHt * 100) : 0 %} {% set tone_index = expense.fournisseur ? expense.fournisseur.id % 6 : 0 %} {% else %} {% endfor %}
DateFournisseurLibelléCatégorie Montant HTTVATotal TTC Ventilation projetsÉtatJustif.Actions
{{ expense.dateDepense ? expense.dateDepense|date('d/m/Y') : '—' }} #DEP-{{ expense.id }}
{{ supplier_name|slice(0, 2)|upper }} {{ supplier_name }}
{{ expense.numeroDocument ?: 'Dépense sans libellé' }}{{ expense.originalFilename ?: 'Saisie manuelle' }} {{ category_name }} {{ expense.montanHt|number_format(2, ',', ' ') }} € {{ vat_rate|number_format(0, ',', ' ') }} % ·
{{ expense.montantTaxe|number_format(2, ',', ' ') }} €
{{ expense.montantTTC|number_format(2, ',', ' ') }} € {% if allocation_status == 'fully_allocated' %} Ventilée {% elseif allocation_status == 'partially_allocated' %} Partielle {% elseif allocation_status == 'over_allocated' %} Dépassement {% else %} Non ventilée {% endif %} {% for allocation in expense.projectAllocations %} {{ allocation.project.titre|default('Projet') }} {{ allocation.allocatedPercent ? allocation.allocatedPercent|number_format(0, ',', ' ') ~ ' %' : allocation.allocatedAmount|number_format(2, ',', ' ') ~ ' €' }} {% else %} {% if expense.projet %}{{ expense.projet.titre }}{% endif %} {% endfor %} {{ is_paid ? 'Payée' : (is_complete ? 'Validée' : 'Brouillon') }}
{% if is_granted('EXPENSE_EDIT', expense) %}{% endif %}
Aucune dépense ne correspond aux filtres.
Période : {{ filters.periodLabel }} Total des dépenses : {{ period_total|number_format(2, ',', ' ') }} €
{% endblock %}