Merge branch 'develop' into fix_asset_scrap_and_sale_dep

This commit is contained in:
Nabin Hait
2022-09-27 15:56:39 +05:30
committed by GitHub
74 changed files with 1428 additions and 882 deletions

View File

@@ -571,6 +571,11 @@ class AccountsController(TransactionBase):
# if user changed the discount percentage then set user's discount percentage ?
if pricing_rule_args.get("price_or_product_discount") == "Price":
item.set("pricing_rules", pricing_rule_args.get("pricing_rules"))
if pricing_rule_args.get("apply_rule_on_other_items"):
other_items = json.loads(pricing_rule_args.get("apply_rule_on_other_items"))
if other_items and item.item_code not in other_items:
return
item.set("discount_percentage", pricing_rule_args.get("discount_percentage"))
item.set("discount_amount", pricing_rule_args.get("discount_amount"))
if pricing_rule_args.get("pricing_rule_for") == "Rate":