fix: Employee link formatter showing incorrect value for Employee Name (#28504)
This commit is contained in:
parent
e7eef9601d
commit
5ba1bc1572
@ -751,9 +751,13 @@ frappe.form.link_formatters['Item'] = function(value, doc) {
|
||||
}
|
||||
|
||||
frappe.form.link_formatters['Employee'] = function(value, doc) {
|
||||
if(doc && doc.employee_name && doc.employee_name !== value) {
|
||||
return value? value + ': ' + doc.employee_name: doc.employee_name;
|
||||
if (doc && value && doc.employee_name && doc.employee_name !== value && doc.employee === value) {
|
||||
return value + ': ' + doc.employee_name;
|
||||
} else if (!value && doc.doctype && doc.employee_name) {
|
||||
// format blank value in child table
|
||||
return doc.employee;
|
||||
} else {
|
||||
// if value is blank in report view or project name and name are the same, return as is
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user