fix: ignore cancelled gle in voucher-wise balance report (#36417)

fix: ignore cancelled gle
This commit is contained in:
Gursheen Kaur Anand
2023-07-31 14:29:20 +05:30
committed by GitHub
parent c6d8f15b10
commit 1ddfaa7605

View File

@@ -46,6 +46,7 @@ def get_data(filters):
.select( .select(
gle.voucher_type, gle.voucher_no, Sum(gle.debit).as_("debit"), Sum(gle.credit).as_("credit") gle.voucher_type, gle.voucher_no, Sum(gle.debit).as_("debit"), Sum(gle.credit).as_("credit")
) )
.where(gle.is_cancelled == 0)
.groupby(gle.voucher_no) .groupby(gle.voucher_no)
) )
query = apply_filters(query, filters, gle) query = apply_filters(query, filters, gle)