fix: fetch depreciation amount only if depr entry is made (#21894)

This commit is contained in:
Saqib
2020-05-25 19:20:54 +05:30
committed by GitHub
parent bbec37f713
commit 8ae7bb2bc4

View File

@@ -111,7 +111,7 @@ def get_assets(filters):
0
end), 0) as depreciation_amount_during_the_period
from `tabAsset` a, `tabDepreciation Schedule` ds
where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s and a.name = ds.parent
where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s and a.name = ds.parent and ifnull(ds.journal_entry, '') != ''
group by a.asset_category
union
SELECT a.asset_category,