Merge pull request #58688 from krishna-254/fix/issue-55219-bank-reconciliation-document-types

fix: handle missing bank reconciliation document types
This commit is contained in:
Khushi Rawat
2026-09-16 00:01:58 +05:30
committed by GitHub
2 changed files with 5 additions and 0 deletions

View File

@@ -1138,6 +1138,7 @@ def check_matching(
from_reference_date=None,
to_reference_date=None,
):
document_types = document_types or []
exact_match = True if "exact_match" in document_types else False
common_filters = frappe._dict(

View File

@@ -131,6 +131,10 @@ class TestBankReconciliationTool(ERPNextTestSuite, AccountsTestMixin):
names = [t.name for t in get_bank_transactions(self.bank_account, to_date=add_days(today(), -1))]
self.assertEqual(names, [])
def test_get_linked_payments_without_document_types(self):
bank_transaction = self.make_bank_transaction(date=today())
self.assertEqual(get_linked_payments(bank_transaction.name), [])
def test_deposit_matches_amount_received_in_bank_account(self):
# money leaves another bank account and lands here minus a charge, so the two sides differ
payment = frappe.get_doc(