Browse Source

fix(Bank Reconciliation): get credit amount for bank account of type liability

develop
Anuja Pawar 3 years ago
committed by GitHub
parent
commit
2f004693c3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py

10
erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py

@ -342,7 +342,15 @@ def get_pe_matching_query(amount_condition, account_from_to, transaction):
def get_je_matching_query(amount_condition, transaction):
# get matching journal entry query
cr_or_dr = "credit" if transaction.withdrawal > 0 else "debit"
company_account = frappe.get_value("Bank Account", transaction.bank_account, "account")
root_type = frappe.get_value("Account", company_account, "root_type")
if root_type == "Liability":
cr_or_dr = "debit" if transaction.withdrawal > 0 else "credit"
else:
cr_or_dr = "credit" if transaction.withdrawal > 0 else "debit"
return f"""
SELECT

Loading…
Cancel
Save