fix: Depreciation Posting Date is mandatory even if Calculate Depreciation has disabled

This commit is contained in:
Rohit Waghchaure
2020-11-30 17:20:51 +05:30
parent 2b3a20ed5b
commit e5d4b4c1ed

View File

@@ -323,7 +323,10 @@ frappe.ui.form.on('Asset', {
calculate_depreciation: function(frm) {
frm.toggle_reqd("finance_books", frm.doc.calculate_depreciation);
frm.trigger('set_finance_book');
if (frm.doc.calculate_depreciation) {
frm.trigger('set_finance_book');
}
},
gross_purchase_amount: function(frm) {