Skip to content

Commit

Permalink
fix: Payment entry with TDS in bank reco statement (#34961)
Browse files Browse the repository at this point in the history
fix: Payment entry with TDS in bank reco statement (#34961)

(cherry picked from commit ecea9b4)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
  • Loading branch information
mergify[bot] and deepeshgarg007 authored Apr 25, 2023
1 parent f9f42c7 commit f43ea0d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion erpnext/accounts/doctype/bank_clearance/bank_clearance.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def get_payment_entries(self):
select
"Payment Entry" as payment_document, name as payment_entry,
reference_no as cheque_number, reference_date as cheque_date,
if(paid_from=%(account)s, paid_amount, 0) as credit,
if(paid_from=%(account)s, paid_amount + total_taxes_and_charges, 0) as credit,
if(paid_from=%(account)s, 0, received_amount) as debit,
posting_date, ifnull(party,if(paid_from=%(account)s,paid_to,paid_from)) as against_account, clearance_date,
if(paid_to=%(account)s, paid_to_account_currency, paid_from_account_currency) as account_currency
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def get_entries(filters):
payment_entries = frappe.db.sql(
"""SELECT
"Payment Entry", name, posting_date, reference_no, clearance_date, party,
if(paid_from=%(account)s, paid_amount * -1, received_amount)
if(paid_from=%(account)s, ((paid_amount * -1) - total_taxes_and_charges) , received_amount)
FROM
`tabPayment Entry`
WHERE
Expand Down

0 comments on commit f43ea0d

Please sign in to comment.