Merge pull request #24437 from AfshanKhan/fix-stock-ageing

fix: stock ageing should not take cancelled stock entries.
This commit is contained in:
rohitwaghchaure 2021-01-21 23:09:41 +05:30 committed by GitHub
commit 3afc6b1333
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -233,7 +233,8 @@ def get_stock_ledger_entries(filters):
from `tabItem` {item_conditions}) item
where item_code = item.name and
company = %(company)s and
posting_date <= %(to_date)s
posting_date <= %(to_date)s and
is_cancelled != 1
{sle_conditions}
order by posting_date, posting_time, sle.creation, actual_qty""" #nosec
.format(item_conditions=get_item_conditions(filters),