fix: Item Link Formatter Behaviour
This commit is contained in:
parent
b3aeba1a1b
commit
824f48fd23
@ -703,9 +703,13 @@ erpnext.utils.map_current_doc = function(opts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
frappe.form.link_formatters['Item'] = function(value, doc) {
|
frappe.form.link_formatters['Item'] = function(value, doc) {
|
||||||
if(doc && doc.item_name && doc.item_name !== value) {
|
if (doc && value && doc.item_name && doc.item_name !== value) {
|
||||||
return value? value + ': ' + doc.item_name: doc.item_name;
|
return value + ': ' + doc.item_name;
|
||||||
|
} else if (!value && doc.doctype && doc.item_name) {
|
||||||
|
// format blank value in child table
|
||||||
|
return doc.item_name;
|
||||||
} else {
|
} else {
|
||||||
|
// if value is blank in report view or item code and name are the same, return as is
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user