From e2ee455acc8d1a6badd4a3fbc6913cefdedff32c Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 12 Aug 2020 20:58:03 +0530 Subject: [PATCH] fix: Calculate taxes if tax is based on item quantity --- erpnext/controllers/taxes_and_totals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index 8f86dce436..2a14be8532 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -173,7 +173,7 @@ class calculate_taxes_and_totals(object): + tax.tax_fraction_for_current_item cumulated_tax_fraction += tax.tax_fraction_for_current_item - total_inclusive_tax_amount_per_qty += inclusive_tax_amount_per_qty * flt(item.stock_qty) + total_inclusive_tax_amount_per_qty += inclusive_tax_amount_per_qty * flt(item.qty) if not self.discount_amount_applied and item.qty and (cumulated_tax_fraction or total_inclusive_tax_amount_per_qty): amount = flt(item.amount) - total_inclusive_tax_amount_per_qty