From 427dbd80ab1e5e228bfd652e8790fb430ad4a721 Mon Sep 17 00:00:00 2001 From: DanielAPereyraB Date: Mon, 20 Nov 2023 14:20:05 -0400 Subject: [PATCH] [FIX] l10n_do_accounting: fix when computing l10n_do_itbis_amount --- l10n_do_accounting/__manifest__.py | 2 +- l10n_do_accounting/models/account_move_line.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/l10n_do_accounting/__manifest__.py b/l10n_do_accounting/__manifest__.py index c146cda72..153eb11e9 100644 --- a/l10n_do_accounting/__manifest__.py +++ b/l10n_do_accounting/__manifest__.py @@ -8,7 +8,7 @@ "category": "Localization", "license": "LGPL-3", "website": "https://github.com/odoo-dominicana", - "version": "13.0.1.13.0", + "version": "13.0.1.13.1", # any module necessary for this one to work correctly "depends": ["l10n_latam_invoice_document", "l10n_do"], # always loaded diff --git a/l10n_do_accounting/models/account_move_line.py b/l10n_do_accounting/models/account_move_line.py index 3e77d5f3d..4155d6889 100644 --- a/l10n_do_accounting/models/account_move_line.py +++ b/l10n_do_accounting/models/account_move_line.py @@ -39,8 +39,11 @@ def _get_price_total_and_subtotal( line_itbis_taxes = self.tax_ids.filtered( lambda t: t.tax_group_id == self.env.ref("l10n_do.group_itbis") ) + price_unit = self.price_unit + if self.discount: + price_unit = price_unit - (price_unit * (self.discount / 100)) itbis_taxes_data = line_itbis_taxes.compute_all( - price_unit=self.price_unit, + price_unit=price_unit, quantity=self.quantity, ) res["l10n_do_itbis_amount"] = sum(