Skip to content

Commit

Permalink
fix: incorrect customer outstanding amount (#38475)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
niyazrazak and barredterra authored Dec 4, 2023
1 parent fc12238 commit 3df1d75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion erpnext/selling/doctype/customer/customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 3df1d75

Please sign in to comment.