mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
changed the description of rate fields depending on margin type and if ignore pricing is unchecked returned the rate=0
This commit is contained in:
committed by
rohitwaghchaure
parent
8c8fa17a9b
commit
ea60c635ab
@@ -89,3 +89,8 @@ cur_frm.cscript.selling = function() {
|
|||||||
cur_frm.cscript.buying = function() {
|
cur_frm.cscript.buying = function() {
|
||||||
cur_frm.cscript.set_options_for_applicable_for();
|
cur_frm.cscript.set_options_for_applicable_for();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Dynamically change the description based on type of margin
|
||||||
|
cur_frm.cscript.type = function(doc){
|
||||||
|
cur_frm.set_df_property('rate', 'description', doc.type=='Percentage'?'In Percentage %':'In Amount')
|
||||||
|
}
|
||||||
@@ -126,6 +126,12 @@ def get_pricing_rule_for_item(args):
|
|||||||
})
|
})
|
||||||
|
|
||||||
if args.ignore_pricing_rule or not args.item_code:
|
if args.ignore_pricing_rule or not args.item_code:
|
||||||
|
# if ignore pricing rule then set the rate or amount field to zero
|
||||||
|
if item_details.doctype in ["Quotation Item", "Sales Order Item"]:
|
||||||
|
item_details.update({
|
||||||
|
"type":"Percentage",
|
||||||
|
"rate_or_amount": 0.00
|
||||||
|
})
|
||||||
return item_details
|
return item_details
|
||||||
|
|
||||||
if not (args.item_group and args.brand):
|
if not (args.item_group and args.brand):
|
||||||
|
|||||||
Reference in New Issue
Block a user