mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-18 19:07:55 +00:00
[minor] formatter for item and employee
This commit is contained in:
@@ -179,6 +179,22 @@ erpnext.utils.map_current_doc = function(opts) {
|
||||
}
|
||||
}
|
||||
|
||||
frappe.form.link_formatters['Item'] = function(value, doc) {
|
||||
if(doc.item_name && doc.item_name !== value) {
|
||||
return value + ': ' + doc.item_name;
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
frappe.form.link_formatters['Employee'] = function(value, doc) {
|
||||
if(doc.employee_name && doc.employee_name !== value) {
|
||||
return value + ': ' + doc.employee_name;
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
// add description on posting time
|
||||
$(document).on('app_ready', function() {
|
||||
if(!frappe.datetime.is_timezone_same()) {
|
||||
|
||||
Reference in New Issue
Block a user