[fix] apply pricing rule added type and rate on ignore pricing rule trigger
diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
index 7802272..b9c4cbb 100644
--- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
+++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
@@ -161,6 +161,8 @@
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 @@
# 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):
diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js
index 3eb528f..e0c603a 100644
--- a/erpnext/selling/sales_common.js
+++ b/erpnext/selling/sales_common.js
@@ -338,7 +338,6 @@
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;