From d3f31595b0a1c2fd619e6e20d991e7f0c1565275 Mon Sep 17 00:00:00 2001
From: Juliana <juliana@le-filament.com>
Date: Tue, 16 Nov 2021 10:43:46 +0100
Subject: [PATCH] Prise en compte HT

---
 views/report_account.xml | 12 ++++++++----
 views/report_sale.xml    | 12 ++++++++----
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/views/report_account.xml b/views/report_account.xml
index 3c03b62..f49467f 100644
--- a/views/report_account.xml
+++ b/views/report_account.xml
@@ -64,7 +64,8 @@
                         </th>
                         <th t-if="o.company_id.vat" name="th_taxes" t-attf-class="text-left {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"><span>Taxes</span></th>
                         <th name="th_subtotal" class="text-right">
-                            <span groups="account.group_show_line_subtotals_tax_excluded">Montant HT</span>
+                            <t t-if="o.company_id.vat"><span groups="account.group_show_line_subtotals_tax_excluded">Montant HT</span></t>
+                            <t t-else=""><span groups="account.group_show_line_subtotals_tax_excluded">Montant</span></t>
                             <span groups="account.group_show_line_subtotals_tax_included">Prix total</span>
                         </th>
                     </tr>
@@ -115,7 +116,8 @@
                         <t t-if="current_section and (line_last or lines[line_index+1].display_type == 'line_section')">
                             <tr class="is-subtotal text-right">
                                 <td colspan="99">
-                                    <strong class="mr16">Sous-total HT</strong>
+                                    <t t-if="o.company_id.vat"><strong class="mr16">Sous-total HT</strong></t>
+                                    <t t-else=""><strong class="mr16">Sous-total</strong></t>
                                     <span
                                         t-esc="current_subtotal"
                                         t-options='{"widget": "monetary", "display_currency": o.currency_id}'
@@ -133,7 +135,8 @@
                 <div t-attf-class="#{'col-6' if report_type != 'html' else 'col-sm-7 col-md-6'} ml-auto">
                     <table class="table table-sm" style="page-break-inside: avoid;">
                         <tr t-if="o.company_id.vat" class="border-black o_subtotal" style="">
-                            <td><strong>Sous-total HT</strong></td>
+                            <td t-if="o.company_id.vat"><strong>Sous-total HT</strong></td>
+                            <td t-if="not o.company_id.vat"><strong>Sous-total</strong></td>
                             <td class="text-right">
                                 <span t-field="o.amount_untaxed"/>
                             </td>
@@ -162,7 +165,8 @@
                         </t>
                         </t>
                         <tr class="border-black o_total">
-                            <td><strong>Total TTC</strong></td>
+                            <td t-if="o.company_id.vat"><strong>Total TTC</strong></td>
+                            <td t-if="not o.company_id.vat"><strong>Total</strong></td>
                             <td class="text-right">
                                 <span class="text-nowrap" t-field="o.amount_total"/>
                             </td>
diff --git a/views/report_sale.xml b/views/report_sale.xml
index ac59c81..154a130 100644
--- a/views/report_sale.xml
+++ b/views/report_sale.xml
@@ -66,7 +66,8 @@
                         </th>
                         <th t-if="doc.company_id.vat" name="th_taxes" class="text-right">Taxes</th>
                         <th name="th_subtotal" class="text-right">
-                            <span groups="account.group_show_line_subtotals_tax_excluded">Montant HT</span>
+                            <t t-if="doc.company_id.vat"><span groups="account.group_show_line_subtotals_tax_excluded">Montant HT</span></t>
+                            <t t-else=""><span groups="account.group_show_line_subtotals_tax_excluded">Montant</span></t>
                             <span groups="account.group_show_line_subtotals_tax_included">Prix total</span>
                         </th>
                     </tr>
@@ -118,7 +119,8 @@
                         <t t-if="current_section and (line_last or doc.order_line[line_index+1].display_type == 'line_section')">
                             <tr class="is-subtotal text-right">
                                 <td name="td_section_subtotal" colspan="99">
-                                    <strong class="mr16">Sous-total HT</strong>
+                                    <t t-if="doc.company_id.vat"><strong class="mr16">Sous-total HT</strong></t>
+                                    <t t-else=""><strong class="mr16">Sous-total</strong></t>
                                     <span
                                         t-esc="current_subtotal"
                                         t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'
@@ -136,7 +138,8 @@
                 <div t-attf-class="#{'col-4' if report_type != 'html' else 'col-sm-7 col-md-5'} ml-auto">
                     <table class="table table-sm">
                         <tr t-if="doc.company_id.vat" class="border-black o_subtotal" style="">
-                            <td name="td_amount_untaxed_label"><strong>Sous-total HT</strong></td>
+                            <td t-if="doc.company_id.vat" name="td_amount_untaxed_label"><strong>Sous-total HT</strong></td>
+                            <td t-if="not doc.company_id.vat" name="td_amount_untaxed_label"><strong>Sous-total</strong></td>
                             <td name="td_amount_untaxed" class="text-right">
                                 <span t-field="doc.amount_untaxed"/>
                             </td>
@@ -167,7 +170,8 @@
                             </t>
                         </t>
                         <tr class="border-black o_total">
-                            <td name="td_amount_total_label"><strong>Total TTC</strong></td>
+                            <td t-if="doc.company_id.vat" name="td_amount_total_label"><strong>Total TTC</strong></td>
+                            <td t-if="not doc.company_id.vat" name="td_amount_total_label"><strong>Total</strong></td>
                             <td name="td_amount_total" class="text-right">
                                 <span t-field="doc.amount_total"/>
                             </td>
-- 
GitLab