feat(devis): Gère l'affichage et les calculs des promotions, cautions et formules

This commit is contained in:
Serreau Jovann
2026-02-10 09:40:01 +01:00
parent cced4e8bd9
commit 916d19062e
7 changed files with 223 additions and 45 deletions

View File

@@ -25,6 +25,7 @@
<th class="px-6 py-5 text-[10px] font-black text-slate-300 uppercase tracking-[0.2em]">Date</th>
<th class="px-6 py-5 text-[10px] font-black text-slate-300 uppercase tracking-[0.2em]">Statut</th>
<th class="px-6 py-5 text-[10px] font-black text-slate-300 uppercase tracking-[0.2em] text-center">Total HT</th>
<th class="px-6 py-5 text-[10px] font-black text-slate-300 uppercase tracking-[0.2em] text-center">Caution</th>
<th class="px-6 py-5 text-[10px] font-black text-slate-300 uppercase tracking-[0.2em] text-right">Actions</th>
</tr>
</thead>
@@ -92,9 +93,30 @@
{# MONTANT #}
<td class="px-6 py-4 text-center">
<span class="text-sm font-black text-white">
{{ (quote|totalQuoto)|number_format(2, ',', ' ') }}
</span>
<div class="flex flex-col items-center">
{% if quote.orderSession and quote.orderSession.promotion %}
<span class="text-sm font-black text-white">
{{ (quote|totalQuotoHT)|number_format(2, ',', ' ') }}
</span>
<span class="text-[10px] text-slate-500 line-through font-bold">
{{ (quote|totalQuotoBeforeDiscount)|number_format(2, ',', ' ') }}
</span>
<span class="text-[9px] text-emerald-400 font-bold uppercase tracking-wider mt-1">
Promo -{{ quote.orderSession.promotion.percentage }}%
</span>
{% else %}
<span class="text-sm font-black text-white">
{{ (quote|totalQuotoHT)|number_format(2, ',', ' ') }}
</span>
{% endif %}
</div>
</td>
{# CAUTION #}
<td class="px-6 py-4 text-center">
<span class="text-xs font-bold text-slate-400">
{{ (quote|totalCaution)|number_format(2, ',', ' ') }}
</span>
</td>
{# ACTIONS #}