From 1ddfaa7605f710b2fd12ccdfa38824cd086f576d Mon Sep 17 00:00:00 2001 From: Gursheen Kaur Anand <40693548+GursheenK@users.noreply.github.com> Date: Mon, 31 Jul 2023 14:29:20 +0530 Subject: [PATCH] fix: ignore cancelled gle in voucher-wise balance report (#36417) fix: ignore cancelled gle --- .../accounts/report/voucher_wise_balance/voucher_wise_balance.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/report/voucher_wise_balance/voucher_wise_balance.py b/erpnext/accounts/report/voucher_wise_balance/voucher_wise_balance.py index 5ab3611b9af..bd9e9fccadc 100644 --- a/erpnext/accounts/report/voucher_wise_balance/voucher_wise_balance.py +++ b/erpnext/accounts/report/voucher_wise_balance/voucher_wise_balance.py @@ -46,6 +46,7 @@ def get_data(filters): .select( 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) ) query = apply_filters(query, filters, gle)