fix: Acccounting Dimension disappearing in first row after refresh
diff --git a/erpnext/public/js/utils/dimension_tree_filter.js b/erpnext/public/js/utils/dimension_tree_filter.js
index 7abe4a7..8b6de0f 100644
--- a/erpnext/public/js/utils/dimension_tree_filter.js
+++ b/erpnext/public/js/utils/dimension_tree_filter.js
@@ -35,11 +35,13 @@
 							}
 						}
 
-						if (frm.doc.items && frm.doc.items.length) {
+						if (frm.doc.items && frm.doc.items.length && frm.doc.docstatus === 0
+							&& (!frm.doc.items[0][dimension['fieldname']])) {
 							frm.doc.items[0][dimension['fieldname']] = erpnext.default_dimensions[frm.doc.company][dimension['document_type']];
 						}
 
-						if (frm.doc.accounts && frm.doc.accounts.length) {
+						if (frm.doc.accounts && frm.doc.accounts.length && frm.doc.docstatus === 0
+							&& (!frm.doc.items[0][dimension['fieldname']])) {
 							frm.doc.accounts[0][dimension['fieldname']] = erpnext.default_dimensions[frm.doc.company][dimension['document_type']];
 						}
 					}