Merge pull request #38550 from frappe/mergify/bp/version-15-hotfix/pr-38475

fix: incorrect customer outstanding amount (backport #38475)
This commit is contained in:
ruthra kumar 2023-12-04 13:57:00 +05:30 committed by GitHub
commit 92c8eb17ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -602,7 +602,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),