fix: Pricing rule not working for POS

This commit is contained in:
Rohit Waghchaure
2019-03-31 16:42:41 +05:30
parent 04399e6621
commit e540534e42
6 changed files with 148 additions and 112 deletions

View File

@@ -282,7 +282,7 @@ class AccountsController(TransactionBase):
if self.doctype in ["Purchase Invoice", "Sales Invoice"] and item.meta.get_field('is_fixed_asset'):
item.set('is_fixed_asset', ret.get('is_fixed_asset', 0))
if ret.get("pricing_rules"):
if ret.get("pricing_rules") and not ret.get("validate_applied_rule", 0):
# if user changed the discount percentage then set user's discount percentage ?
item.set("pricing_rules", ret.get("pricing_rules"))
item.set("discount_percentage", ret.get("discount_percentage"))