[fixes] minor fixes, added eval on pricing rule, Sales Order Item, Quotation Item

This commit is contained in:
mbauskar 2016-01-21 19:59:13 +05:30 committed by rohitwaghchaure
parent 6f60339e75
commit b6d19bcfc2
5 changed files with 8 additions and 4 deletions

View File

@ -731,6 +731,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval: doc.selling == 1",
"fieldname": "margin",
"fieldtype": "Section Break",
"hidden": 0,
@ -755,6 +756,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "Percentage",
"fieldname": "type",
"fieldtype": "Select",
"hidden": 0,
@ -803,6 +805,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "0",
"fieldname": "rate",
"fieldtype": "Float",
"hidden": 0,
@ -1024,7 +1027,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-01-18 17:00:59.492217",
"modified": "2016-01-21 19:10:54.861787",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Pricing Rule",

View File

@ -168,7 +168,9 @@ def get_pricing_rule_for_item(args):
"discount_percentage": 0.0
})
else:
item_details.discount_percentage = pricing_rule.discount_percentage
# 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

View File

@ -459,6 +459,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.price_list_rate",
"fieldname": "type",
"fieldtype": "Select",
"hidden": 0,

View File

@ -302,7 +302,6 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
callback: function(r) {
if(!r.exc){
var doc = frappe.model.sync(r.message);
console.log(r.message)
frappe.set_route("Form", r.message.doctype, r.message.name);
}
}

View File

@ -497,7 +497,6 @@ def apply_price_list(args, as_doc=False):
# update the value
if fieldname in item and fieldname not in ("name", "doctype"):
item[fieldname] = children[i][fieldname]
return args
else:
return {