diff --git a/round_tax_amount_row_wise/__init__.py b/round_tax_amount_row_wise/__init__.py index 6526deb..a73339b 100644 --- a/round_tax_amount_row_wise/__init__.py +++ b/round_tax_amount_row_wise/__init__.py @@ -1 +1 @@ -__version__ = "0.0.7" +__version__ = "0.0.8" diff --git a/round_tax_amount_row_wise/override/__init__.py b/round_tax_amount_row_wise/override/__init__.py index afa272a..efb0f00 100644 --- a/round_tax_amount_row_wise/override/__init__.py +++ b/round_tax_amount_row_wise/override/__init__.py @@ -1,7 +1,8 @@ from round_tax_amount_row_wise.override.override_doctype_class_having_accounts_controller import ( get_override_doctype_class, ) + try: - override_doctype_class = get_override_doctype_class() -except : - pass \ No newline at end of file + override_doctype_class = get_override_doctype_class() +except Exception: + pass diff --git a/round_tax_amount_row_wise/override/taxes_and_totals.py b/round_tax_amount_row_wise/override/taxes_and_totals.py index b912ea5..72e03e6 100644 --- a/round_tax_amount_row_wise/override/taxes_and_totals.py +++ b/round_tax_amount_row_wise/override/taxes_and_totals.py @@ -484,7 +484,11 @@ def get_current_tax_amount(self, item, tax, item_tax_map): ) elif tax.charge_type == "On Net Total": - current_tax_amount = (tax_rate / 100.0) * item.net_amount + if self.tax.included_in_print_rate: + net_amount = item.amount / (1 + tax_rate / 100.0) + current_tax_amount = item.amount - net_amount + else: + current_tax_amount = (tax_rate / 100.0) * item.amount elif tax.charge_type == "On Previous Row Amount": current_tax_amount = (tax_rate / 100.0) * self.doc.get("taxes")[ cint(tax.row_id) - 1