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>
(cherry picked from commit 3df1d75)
  • Loading branch information
niyazrazak authored and mergify[bot] committed Dec 4, 2023
1 parent 66e3dc7 commit 98fe89a
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 @@ -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),
Expand Down

0 comments on commit 98fe89a

Please sign in to comment.