From e040510545a73ef6528065b9129b3f3c2ce21ba9 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 13 Oct 2016 12:14:32 +0530 Subject: [PATCH] Always calculate additional discount amount if percentage is mentioned --- 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 d8b5e2ebd80..23691436047 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -338,7 +338,7 @@ class calculate_taxes_and_totals(object): tax.item_wise_tax_detail = json.dumps(tax.item_wise_tax_detail, separators=(',', ':')) def set_discount_amount(self): - if not self.doc.discount_amount and self.doc.additional_discount_percentage: + if self.doc.additional_discount_percentage: self.doc.discount_amount = flt(flt(self.doc.get(scrub(self.doc.apply_discount_on))) * self.doc.additional_discount_percentage / 100, self.doc.precision("discount_amount"))