From f222ba134d9f29eba50a089f8058a2628b2c621e Mon Sep 17 00:00:00 2001
From: Yohann D'ANELLO <yohann.danello@gmail.com>
Date: Thu, 6 Aug 2020 19:39:40 +0200
Subject: [PATCH] :bug: Remove \eaddto in the invoice template, unicode
 characters weren't supported

---
 templates/treasury/invoice_sample.tex | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/templates/treasury/invoice_sample.tex b/templates/treasury/invoice_sample.tex
index cf79029e..b20eff3b 100644
--- a/templates/treasury/invoice_sample.tex
+++ b/templates/treasury/invoice_sample.tex
@@ -24,8 +24,6 @@
     \FPround{\prix}{#3}{2}
     \FPround{\montant}{#4}{2}
     \FPadd{\TotalHT}{\TotalHT}{\montant}
-
-    \eaddto\ListeProduits{#1    &    \prix    &    #2    &    \montant    \cr}
 }
 
 \newcommand{\AfficheResultat}{%
@@ -48,15 +46,12 @@
     \textbf{Total TTC}    & & &    \TotalTTC
 }
 
-\newcommand*\eaddto[2]{% version développée de \addto
-   \edef\tmp{#2}%
-   \expandafter\addto
-   \expandafter#1%
-   \expandafter{\tmp}%
+\newcommand	{\ListeProduits}{
+    {% for product in products %}
+        {{ product.designation|safe|escape_tex }}    &    {{ product.amount_euros|safe|escape_tex }}    &    {{ product.quantity|safe|escape_tex }}    &    {{ product.total_euros|safe|escape_tex }}   \cr
+    {% endfor %}
 }
 
-\newcommand	{\ListeProduits}{}
-
 % Logo du BDE
 \AddToShipoutPicture*{
     \put(0,0){
-- 
GitLab