Skip to content

One EBICS User for several Companies #404

Description

@PatrickDEissler

Describe the bug

An Error Log with following message is created:

Bank Account not found for IBAN ...

Even though, it seems, the Bank Account exists.

How are Bank Accounts searched:

def get_bank_account(iban: str, bank: str, company: str) -> str | None:
	return frappe.db.get_value(
		"Bank Account",
		{
			"iban": iban,
			"disabled": 0,
			"bank": bank,
			"is_company_account": 1,
			"company": company,
		},
	)

This shows that it is impossible to support Bank Accounts from two different Companies by one EBICS User.
This sounds reasonable. But, since some bank send transactions for several companies, we should be able to receive them.
Example, where that typically happens: Both companies have the same owner, or are even organized in a group structure.

To Reproduce

  1. Create an EBICS User and two Bank Accounts (from two different Companies)
  2. Receive bank transactions (C52 or C53) for both of these accounts.

Current behaviour

Only transactions of the EBICS User 's company accounts are created.

Expected behaviour

Create transactions for all received accounts, that have is_company_account enabled.

Suggestion

Remove the filter on company in get_bank_account.

Installed apps and versions

Frappe Framework: v15.101.5 (HEAD)
ERPNext: v15.100.2 (HEAD)
ERPNext Germany: v15.23.1 (HEAD)
PDF on Submit: v15.4.0 (HEAD)
ALYF Banking: v15.34.0 (HEAD)
Frappe HR: v15.54.3 (HEAD)
European e-Invoice: v15.16.2 (HEAD)
Time Capture: v0.0.1 (HEAD)
ERPNext Kassenbuch: v0.0.1 (HEAD)
Ask ALYF: v15.0.0 (HEAD)
PDF Merger: v0.0.1 (HEAD)

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