Bank account master — system description
Data model of the bank account master and the partner link, canonical 24-digit normalisation, bank identification, balance recalculation, permissions and known limitations.
Overview
Bank account master: canonical 24-digit account identifier, 8-8-8 display, IBAN, SWIFT, GIRO, currency, balance, ledger account; linked to partners through a link table. Two accounts are the same if their 24-digit identifiers (or IBANs) match; before comparison the normaliser pads a 16-digit account on the right with eight zeros to 24 digits.
Data model
Table names carry the installation's own prefix in the database.
| Table | Purpose | Main fields |
|---|---|---|
bankaccount | the bank account | account_id (24 digits, comparison key), bankaccount (8-8-8), iban (HU + 26 digits), SWIFT, GIRO, currency, HUF and currency balance, ledger account, status |
company_bankaccount | partner–account link | written by the company/company model (link, unlink) |
transaction | transaction documents (read) | source of the balance recalculation |
Process
- List: filter by text, currency, status and the company group–client pair (accounts assigned to the selected companies, narrowed by the content scope); sort by account number, currency or balance.
- Save: the central validator normalises the raw account number (24 digits or IBAN), invalid → error; duplicate check on the 24-digit key; an empty GIRO is taken from the first 3 digits of the identifier for a Hungarian IBAN; the currency from the currency master (unknown → HUF); only digits are kept from the ledger account. The record is read back after saving, otherwise a "not saved" error. Pending partners on the form are linked according to the content scope; skipped ones come back as warnings.
- Bank identification: normalisation and bank identification → bank name, SWIFT, GIRO.
- Linking and unlinking partners: after scope and existence checks through the company model's operation, followed by a check that the link was really created or removed.
- Balance recalculation: from the live rows of transaction documents (status not 0, 5 or 9), signed by direction, in HUF and in currency (currency side only from documents in the same currency).
- On/off for every selected account, logged.
- Delete: if partners are linked, it stops and lists up to five; otherwise physical deletion.
Permissions
- Layer 2:
list;edit(form, bank identification, partner linking, recalculation, the Add button); saving a new record asksadd(without the keyeditdecides);status;delete;debug. The company group–client cascade calls the shared company picker withlistpermission. - Layer 3: the company filter and partner linking are bound to the content scope.
Known limitations
- Without a company group or company filter the list shows every bank account (there is no default content narrowing).
- Deletion checks only the partner links, not references from transactions or the bank import.
- The catalogue key
statusdeleteis not implemented by the controller.