[fixes] minor fixes, added eval on pricing rule, Sales Order Item, Quotation Item
This commit is contained in:
parent
6f60339e75
commit
b6d19bcfc2
@ -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",
|
||||
|
@ -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
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user