mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
fix: Usability fixes in accountng dimensions
This commit is contained in:
@@ -41,10 +41,10 @@ frappe.ui.form.on('Accounting Dimension', {
|
|||||||
|
|
||||||
document_type: function(frm) {
|
document_type: function(frm) {
|
||||||
frm.set_value('label', frm.doc.document_type);
|
frm.set_value('label', frm.doc.document_type);
|
||||||
frm.set_value('fieldname', frappe.scrub(frm.doc.document_type));
|
frm.set_value('fieldname', frappe.model.scrub(frm.doc.document_type));
|
||||||
|
|
||||||
frappe.db.get_value('Accounting Dimension', {'document_type': frm.doc.document_type}, 'document_type', (r) => {
|
frappe.db.get_value('Accounting Dimension', {'document_type': frm.doc.document_type}, 'document_type', (r) => {
|
||||||
if (r.document_type) {
|
if (r && r.document_type) {
|
||||||
frm.set_df_property('document_type', 'description', "Document type is already set as dimension");
|
frm.set_df_property('document_type', 'description', "Document type is already set as dimension");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user