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