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.

TablePurposeMain fields
bankaccountthe bank accountaccount_id (24 digits, comparison key), bankaccount (8-8-8), iban (HU + 26 digits), SWIFT, GIRO, currency, HUF and currency balance, ledger account, status
company_bankaccountpartner–account linkwritten by the company/company model (link, unlink)
transactiontransaction documents (read)source of the balance recalculation

Process

  1. 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.
  2. 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.
  3. Bank identification: normalisation and bank identification → bank name, SWIFT, GIRO.
  4. 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.
  5. 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).
  6. On/off for every selected account, logged.
  7. 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 asks add (without the key edit decides); status; delete; debug. The company group–client cascade calls the shared company picker with list permission.
  • 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 statusdelete is not implemented by the controller.