Skip to content

[BUG] Test fails on newer version of erpnext #35

@dvdl16

Description

@dvdl16

Current Behavior


Test fails with:

Running before_tests                                                                                                                                                                                                       │
 │    E                                                                                                                                                                                                                          │
 │    ======================================================================                                                                                                                                                     │
 │    ERROR: test_custom_create_journal_entry_bts_adds_cost_center (csf_za.overrides.accounts.test_bank_reconciliation_tool.TestBankReconciliationToolOverrides)                                                                 │
 │    Test custom_create_journal_entry_bts adds Cost Center to the acounts in the created Journal Entry                                                                                                                          │
 │    ----------------------------------------------------------------------                                                                                                                                                     │
 │    Traceback (most recent call last):                                                                                                                                                                                         │
 │      File "/workspace/development/frappe-bench-v15/apps/csf_za/csf_za/overrides/accounts/test_bank_reconciliation_tool.py", line 150, in test_custom_create_journal_entry_bts_adds_cost_center                                │
 │        custom_create_journal_entry_bts(                                                                                                                                                                                       │
 │      File "/workspace/development/frappe-bench-v15/apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper                                                                                                       │
 │        return func(*args, **kwargs)                                                                                                                                                                                           │
 │      File "/workspace/development/frappe-bench-v15/apps/csf_za/csf_za/overrides/accounts/bank_reconciliation_tool.py", line 243, in custom_create_journal_entry_bts                                                           │
 │        return reconcile_vouchers(bank_transaction_name, vouchers)                                                                                                                                                             │
 │      File "/workspace/development/frappe-bench-v15/apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper                                                                                                       │
 │        return func(*args, **kwargs)                                                                                                                                                                                           │
 │      File "/workspace/development/frappe-bench-v15/apps/erpnext/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py", line 475, in reconcile_vouchers                                               │
 │        transaction.allocate_payment_entries()                                                                                                                                                                                 │
 │      File "/workspace/development/frappe-bench-v15/apps/erpnext/erpnext/accounts/doctype/bank_transaction/bank_transaction.py", line 182, in allocate_payment_entries                                                         │
 │        allocable_amount, should_clear, clearance_date = get_clearance_details(                                                                                                                                                │
 │      File "/workspace/development/frappe-bench-v15/apps/erpnext/erpnext/accounts/doctype/bank_transaction/bank_transaction.py", line 346, in get_clearance_details                                                            │
 │        frappe.throw(                                                                                                                                                                                                          │
 │      File "/workspace/development/frappe-bench-v15/apps/frappe/frappe/__init__.py", line 609, in throw                                                                                                                        │
 │        msgprint(                                                                                                                                                                                                              │
 │      File "/workspace/development/frappe-bench-v15/apps/frappe/frappe/__init__.py", line 574, in msgprint                                                                                                                     │
 │        _raise_exception()                                                                                                                                                                                                     │
 │      File "/workspace/development/frappe-bench-v15/apps/frappe/frappe/__init__.py", line 525, in _raise_exception                                                                                                             │
 │        raise exc                                                                                                                                                                                                              │
 │    frappe.exceptions.ValidationError: Journal Entry ACC-JV-2025-00001 is not affecting bank account 1 - _Test Bank - SP                                                                                                       │
 │                                                                                                                                                                                                                               │
 │    ----------------------------------------------------------------------                                                                                                                                                     │
 │    Ran 1 test in 1.705s                                                                                                                                                                                                       │
 │                                                                                                                                                                                                                               │
 │    FAILED (errors=1) 

Steps To Reproduce

.

Expected Behavior

.

Anything else?

No response

Environment and Versions

- Frappe Version: 
- ERPNext Version: "15.57.5"
- South Africa Customisations Version:

Operating System

Windows

What browsers are you seeing the problem on?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions