Skip to content

Commit

Permalink
[FIX] l10n_ar_sale: Discrimination of subtotal and amount in the sale…
Browse files Browse the repository at this point in the history
…s report depending on the tax discrimination

closes #140

Signed-off-by: jok-adhoc <jok@adhoc.com.ar>
  • Loading branch information
lef-adhoc committed Dec 12, 2023
1 parent 31c0a2f commit 19356b9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion l10n_ar_sale/views/l10n_ar_sale_templates.xml
Expand Up @@ -15,7 +15,12 @@
<attribute name="t-field">line.report_price_subtotal</attribute>
</xpath>
<span groups="account.group_show_line_subtotals_tax_included" position="replace">
<span groups="account.group_show_line_subtotals_tax_included">Amount</span>
<t t-if="sale_order.with_context(from_portal_view=True).vat_discriminated">
<span groups="account.group_show_line_subtotals_tax_included">Subtotal</span>
</t>
<t t-else="">
<span groups="account.group_show_line_subtotals_tax_included">Total</span>
</t>
</span>
<xpath expr="//span[@t-field='line.price_total']" position="attributes">
<attribute name="t-field">line.report_price_subtotal</attribute>
Expand Down
7 changes: 6 additions & 1 deletion l10n_ar_sale/views/sale_report_templates.xml
Expand Up @@ -70,7 +70,12 @@
</t>

<span groups="account.group_show_line_subtotals_tax_included" position="replace">
<span groups="account.group_show_line_subtotals_tax_included">Amount</span>
<t t-if="doc.vat_discriminated">
<span groups="account.group_show_line_subtotals_tax_included">Subtotal</span>
</t>
<t t-else="">
<span groups="account.group_show_line_subtotals_tax_included">Total</span>
</t>
</span>

<span t-field="line.price_subtotal" position="attributes">
Expand Down

0 comments on commit 19356b9

Please sign in to comment.