refactor: support payment against reverse payment reconciliation

This commit is contained in:
ruthra kumar
2024-03-02 19:29:58 +05:30
parent c417e7d800
commit 5f15297f28
3 changed files with 15 additions and 7 deletions

View File

@@ -1027,7 +1027,7 @@ def get_outstanding_invoices(
if account:
root_type, account_type = frappe.get_cached_value(
"Account", account, ["root_type", "account_type"]
"Account", account[0], ["root_type", "account_type"]
)
party_account_type = "Receivable" if root_type == "Asset" else "Payable"
party_account_type = account_type or party_account_type
@@ -1038,7 +1038,7 @@ def get_outstanding_invoices(
common_filter = common_filter or []
common_filter.append(ple.account_type == party_account_type)
common_filter.append(ple.account == account)
common_filter.append(ple.account.isin(account))
common_filter.append(ple.party_type == party_type)
common_filter.append(ple.party == party)