Merge branch 'develop' into item-link-formatter
diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js
index 6d73418..ea2093e 100755
--- a/erpnext/public/js/utils.js
+++ b/erpnext/public/js/utils.js
@@ -703,9 +703,13 @@
}
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;
}
}