From 2d7a4b9a81961c7782227c36ec0b2fa804fbd333 Mon Sep 17 00:00:00 2001
From: jordan <jordan@le-filament.com>
Date: Tue, 7 Dec 2021 11:29:16 +0100
Subject: [PATCH] [update] disaply amount residual in report instead of amount
 paid

---
 report/report_scop_bordereau_payments.xml | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/report/report_scop_bordereau_payments.xml b/report/report_scop_bordereau_payments.xml
index fd2a32c..decf3ac 100644
--- a/report/report_scop_bordereau_payments.xml
+++ b/report/report_scop_bordereau_payments.xml
@@ -76,12 +76,14 @@
                                     <tr>
                                         <th>Date d'échéance</th>
                                         <th class="text-right">Montant appelé</th>
-                                        <th class="text-right">Montant réglé</th>
+                                        <th class="text-right">Montant dû</th>
                                     </tr>
                                     <tr t-foreach="schedule_line.get('plan')" t-as="line" style="border-bottom: 1px solid #ccc;">
-                                        <td style="border: none; background: inherit; color: inherit;"><t t-esc="line.get('date_maturity:day')"/></td>
-                                        <td class="text-right" style="border: none; background: inherit; color: inherit;"><t t-esc="line.get('debit')" t-options="{'widget': 'monetary', 'display_currency': o.company_id.currency_id}"/></td>
-                                        <td class="text-right" style="border: none; background: inherit; color: inherit;"><t t-esc="line.get('debit') - line.get('amount_residual')" t-options="{'widget': 'monetary', 'display_currency': o.company_id.currency_id}"/></td>
+                                        <t t-if="line.get('debit') > 0">
+                                            <td style="border: none; background: inherit; color: inherit;"><t t-esc="line.get('date_maturity:day')"/></td>
+                                            <td class="text-right" style="border: none; background: inherit; color: inherit;"><t t-esc="line.get('debit')" t-options="{'widget': 'monetary', 'display_currency': o.company_id.currency_id}"/></td>
+                                            <td class="text-right" style="border: none; background: inherit; color: inherit;"><t t-esc="line.get('amount_residual')" t-options="{'widget': 'monetary', 'display_currency': o.company_id.currency_id}"/></td>
+                                        </t>
                                     </tr>
                                 </table>
                                 <table class="table table-sm table-striped" style="border: none;">
-- 
GitLab