fix: calculate submitted payment entry as paid amount

(cherry picked from commit 561a159aec)
This commit is contained in:
Sugesh393
2024-11-29 17:39:40 +05:30
committed by Mergify
parent 0c28726ce2
commit ebdacc094c

View File

@@ -778,6 +778,8 @@ def get_existing_paid_amount(doctype, name):
.where(PL.against_voucher_type.eq(doctype))
.where(PL.against_voucher_no.eq(name))
.where(PL.amount < 0)
.where(PL.delinked == 0)
.where(PER.docstatus == 1)
.where(PER.payment_request.isnull())
)
response = query.run()