From 5738dd473cee418cdf9abbbb1fe7bdebaa1fc86d Mon Sep 17 00:00:00 2001 From: mbauskar Date: Mon, 18 Jan 2016 16:24:57 +0530 Subject: [PATCH] set the target.ignore_pricing_rule to 0 --- erpnext/selling/doctype/quotation/quotation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 3c8add44f7..c180c415bd 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -91,7 +91,9 @@ def _make_sales_order(source_name, target_doc=None, ignore_permissions=False): if customer: target.customer = customer.name target.customer_name = customer.customer_name - target.ignore_pricing_rule = 1 + # changed from 1 to 0, because margin is applied based on pricing rule. + # User will manually disabled pricing rule on sales order. + target.ignore_pricing_rule = 0 target.flags.ignore_permissions = ignore_permissions target.run_method("set_missing_values") target.run_method("calculate_taxes_and_totals")