mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-21 15:48:29 +00:00
fix: link field displays incorrect value when empty
(cherry picked from commit db00860662)
This commit is contained in:
@@ -1073,12 +1073,14 @@ frappe.form.link_formatters["Project"] = function (value, doc, df) {
|
|||||||
* @returns {string} - The link value with the added title.
|
* @returns {string} - The link value with the added title.
|
||||||
*/
|
*/
|
||||||
function add_link_title(value, doc, df, title_field) {
|
function add_link_title(value, doc, df, title_field) {
|
||||||
if (doc && value && doc[title_field] && doc[title_field] !== value && doc[df.fieldname] === value) {
|
if (value && doc[title_field]) {
|
||||||
return value + ": " + doc[title_field];
|
if (doc[title_field] !== value && doc[df.fieldname] === value) {
|
||||||
} else if (!value && doc.doctype && doc[title_field] && doc.doctype == df.parent) {
|
return value + ": " + doc[title_field];
|
||||||
return doc[title_field];
|
} else if (doc.doctype == df.parent) {
|
||||||
} else {
|
return doc[title_field];
|
||||||
return value;
|
} else {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user