mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 08:35:00 +00:00
fix: validate finance_books table length in asset (#38584)
This commit is contained in:
@@ -322,7 +322,7 @@ frappe.ui.form.on('Asset', {
|
||||
},
|
||||
|
||||
make_schedules_editable: function(frm) {
|
||||
if (frm.doc.finance_books) {
|
||||
if (frm.doc.finance_books.length) {
|
||||
var is_manual_hence_editable = frm.doc.finance_books.filter(d => d.depreciation_method == "Manual").length > 0
|
||||
? true : false;
|
||||
var is_shift_hence_editable = frm.doc.finance_books.filter(d => d.shift_based).length > 0
|
||||
|
||||
Reference in New Issue
Block a user