minor fix for item and employee link formatter
This commit is contained in:
@@ -180,7 +180,7 @@ erpnext.utils.map_current_doc = function(opts) {
|
||||
}
|
||||
|
||||
frappe.form.link_formatters['Item'] = function(value, doc) {
|
||||
if(doc.item_name && doc.item_name !== value) {
|
||||
if(doc && doc.item_name && doc.item_name !== value) {
|
||||
return value + ': ' + doc.item_name;
|
||||
} else {
|
||||
return value;
|
||||
@@ -188,7 +188,7 @@ frappe.form.link_formatters['Item'] = function(value, doc) {
|
||||
}
|
||||
|
||||
frappe.form.link_formatters['Employee'] = function(value, doc) {
|
||||
if(doc.employee_name && doc.employee_name !== value) {
|
||||
if(doc && doc.employee_name && doc.employee_name !== value) {
|
||||
return value + ': ' + doc.employee_name;
|
||||
} else {
|
||||
return value;
|
||||
|
||||
Reference in New Issue
Block a user