fix: incorrect customer outstanding amount (#38475)

* fix: incorrect customer outstanding amount

* chore: resolve linting error

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>

---------

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
(cherry picked from commit 3df1d75bdd7a34c9fef4c4fe9af9341bc2e6e094)
This commit is contained in:
NIYAZ RAZAK 2023-12-04 11:09:49 +03:00 committed by Mergify
parent 66e3dc7358
commit 98fe89a24d

View File

@ -602,7 +602,8 @@ def get_customer_outstanding(
""" """
select sum(debit) - sum(credit) select sum(debit) - sum(credit)
from `tabGL Entry` where party_type = 'Customer' from `tabGL Entry` where party_type = 'Customer'
and party = %s and company=%s {0}""".format( and is_cancelled = 0 and party = %s
and company=%s {0}""".format(
cond cond
), ),
(customer, company), (customer, company),