fix(Bank Reconciliation): get credit amount for bank account of type liability
This commit is contained in:
parent
e498389b00
commit
2f004693c3
@ -342,7 +342,15 @@ def get_pe_matching_query(amount_condition, account_from_to, transaction):
|
|||||||
|
|
||||||
def get_je_matching_query(amount_condition, transaction):
|
def get_je_matching_query(amount_condition, transaction):
|
||||||
# get matching journal entry query
|
# get matching journal entry query
|
||||||
|
|
||||||
|
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"
|
cr_or_dr = "credit" if transaction.withdrawal > 0 else "debit"
|
||||||
|
|
||||||
return f"""
|
return f"""
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user