From b0b179f1b760abfe430b8c192580f8b12b53ba3b Mon Sep 17 00:00:00 2001 From: Saqib Date: Wed, 15 Jan 2020 19:05:35 +0530 Subject: [PATCH] fix: make jv depreciations only if calculate depr is checked (#20282) --- erpnext/assets/doctype/asset/depreciation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/assets/doctype/asset/depreciation.py b/erpnext/assets/doctype/asset/depreciation.py index 2d23f77014..ad671ba0f2 100644 --- a/erpnext/assets/doctype/asset/depreciation.py +++ b/erpnext/assets/doctype/asset/depreciation.py @@ -22,7 +22,7 @@ def post_depreciation_entries(date=None): def get_depreciable_assets(date): return frappe.db.sql_list("""select a.name from tabAsset a, `tabDepreciation Schedule` ds - where a.name = ds.parent and a.docstatus=1 and ds.schedule_date<=%s + where a.name = ds.parent and a.docstatus=1 and ds.schedule_date<=%s and a.calculate_depreciation = 1 and a.status in ('Submitted', 'Partially Depreciated') and ifnull(ds.journal_entry, '')=''""", date)