[fix] apply pricing rule added type and rate on ignore pricing rule trigger
This commit is contained in:
parent
b6d19bcfc2
commit
75b6fbb6a7
@ -161,6 +161,8 @@ def get_pricing_rule_for_item(args):
|
||||
if pricing_rule:
|
||||
item_details.pricing_rule = pricing_rule.name
|
||||
item_details.pricing_rule_for = pricing_rule.price_or_discount
|
||||
item_details.type = pricing_rule.type
|
||||
item_details.rate_or_amount = pricing_rule.rate
|
||||
if pricing_rule.price_or_discount == "Price":
|
||||
item_details.update({
|
||||
"price_list_rate": pricing_rule.price/flt(args.conversion_rate) \
|
||||
@ -171,7 +173,6 @@ def get_pricing_rule_for_item(args):
|
||||
# if user changed the discount percentage then set discount_percentage of user
|
||||
item_details.discount_percentage = pricing_rule.discount_percentage if args.discount_percentage == pricing_rule.discount_percentage\
|
||||
else args.discount_percentage
|
||||
|
||||
return item_details
|
||||
|
||||
def get_pricing_rules(args):
|
||||
|
@ -338,7 +338,6 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||
item.total_margin = item.price_list_rate + item.rate_or_amount;
|
||||
item.rate = flt(item.total_margin * (1 - item.discount_percentage / 100.0),
|
||||
precision("rate", item));
|
||||
console.log(item.rate)
|
||||
}
|
||||
else{
|
||||
item.rate_or_amount = 0.0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user