[minor] fixes for default print format appears twice (#3392)
This commit is contained in:
parent
edeee39122
commit
9149fbc5df
2 changed files with 6 additions and 3 deletions
|
|
@ -77,4 +77,7 @@ def make_default(name):
|
|||
'value': name,
|
||||
})
|
||||
|
||||
frappe.msgprint(frappe._("Done"))
|
||||
frappe.msgprint(frappe._("{0} is now default print format for {1} doctype").format(
|
||||
frappe.bold(name),
|
||||
frappe.bold(print_format.doc_type)
|
||||
))
|
||||
|
|
|
|||
|
|
@ -208,8 +208,8 @@ $.extend(frappe.meta, {
|
|||
});
|
||||
|
||||
if(default_print_format && default_print_format != "Standard") {
|
||||
var index = print_format_list.indexOf(default_print_format) - 1;
|
||||
print_format_list.sort().splice(index, 1);
|
||||
var index = print_format_list.indexOf(default_print_format);
|
||||
print_format_list.splice(index, 1).sort();
|
||||
print_format_list.unshift(default_print_format);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue