Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[13.0][FIX] l10n_do_accounting: consider discount when computing l10n_do_itbis_amount #1119

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion l10n_do_accounting/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion l10n_do_accounting/models/account_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading