mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 16:45:02 +00:00
Merge pull request #20884 from deepeshgarg007/first_row_dimension
fix: Acccounting Dimension disappearing in first row after refresh
This commit is contained in:
@@ -35,11 +35,13 @@ erpnext.doctypes_with_dimensions.forEach((doctype) => {
|
||||
}
|
||||
}
|
||||
|
||||
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']];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user