From 199c0a527212fe0ba2c5a045d869b7b1e8361616 Mon Sep 17 00:00:00 2001
From: benjamin <benjamin@le-filament.com>
Date: Mon, 30 Jan 2023 19:50:58 +0100
Subject: [PATCH] [update] payments report for refund

---
 templates/report_scop_bordereau_payments.xml | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/templates/report_scop_bordereau_payments.xml b/templates/report_scop_bordereau_payments.xml
index 8d8b91f..20eb252 100644
--- a/templates/report_scop_bordereau_payments.xml
+++ b/templates/report_scop_bordereau_payments.xml
@@ -268,10 +268,20 @@
                                         <td
                                             class="text-right"
                                             style="border: none; background: inherit; color: inherit;"
-                                        ><t
+                                        >
+                                            <t t-if="payment.credit > 0">
+                                            <t
                                                 t-esc="payment.credit"
                                                 t-options="{'widget': 'monetary', 'display_currency': o.company_id.currency_id}"
-                                            /></td>
+                                            />
+                                            </t>
+                                            <t t-else="">
+                                            <t
+                                                t-esc="-payment.debit"
+                                                t-options="{'widget': 'monetary', 'display_currency': o.company_id.currency_id}"
+                                            />
+                                        </t>
+                                        </td>
                                     </tr>
                                 </table>
                             </p>
-- 
GitLab