fix: make jv depreciations only if calculate depr is checked (#20282)

This commit is contained in:
Saqib 2020-01-15 19:05:35 +05:30 committed by Nabin Hait
parent a346469e0c
commit b0b179f1b7

View File

@ -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)