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>
This commit is contained in:
NIYAZ RAZAK 2023-12-04 11:09:49 +03:00 committed by GitHub
parent fc12238fcc
commit 3df1d75bdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -587,7 +587,8 @@ def get_customer_outstanding(
"""
select sum(debit) - sum(credit)
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
),
(customer, company),