Bank import — per-row recognition, manual matching, rules
Endpoints of the process, assign and rule rights, the order of the suggestion engine, writing staged items, the permission gaps and rule handling.
The manual intervention endpoints sit under the process, assign and rule function rights (none is in the catalogue seeds). Some endpoints only check the base modify right.
Per-row recognition (process)
recognizerow: the engine for this row only (new or retry); if nothing is recognised, the warning explains which rule failed on which condition and what was compared (explainRowRules).clearstaged: deletes the staged items and sets the row to New (rule, suggested invoice and partner cleared); only on status 1 or 4.- Right: core
modify+process; no content scope on these endpoints.
Manual matching (assign)
- The modal searches the open or requested invoices of the row's client (the statement owner, resolved by the server from the bank account link or
owner_account) (autocompleteInvoice,suggest); for a currency account also in currency and with a rate. Suggestion order: bank account + name > name > amount > invoice number. Mirror draft hint:draftmatch. - Save (
assignMultipleInvoices): the selected invoices (a list or an invoice → amount map, with currency amount and rate) are stored as staged items; a remainder over 2 forints becomes a separate “pending” staged row. updatestaged: name and amount of staged items before finalising.createcompany: a minimal partner company through the company model (name dedup, not a client; name at least 3 characters).repointpartner: callsfinance/invoice::repointInvoicePartner; requires rights on the invoice owner's client.
Right: assign (plus core modify on updatestaged, createcompany, repointpartner); autocompleteInvoice and suggest filter to the clients allowed by getCompanyGroupFilter.
Rules (rule)
rulestatus (on/off) and ruledelete — deletion only if no row refers to the rule (matched_rule_id), otherwise an error with the count. Accepted instead of the bank/bankrule module rights. Right: core modify + rule. “Create rule” opens bank/bankrule.form.
Endpoints checking core rights only
unidentified: an “unidentified” staged item with the row's full amount (partner/owner by direction); the row becomes Recognized.assignBankaccount: links the row's partner account number (GIRO/IBAN) to a company (assignIbanToCompany, dedup on the normalised account).insert: legacy path, a direct document from the staged row with the model's ownaddTransaction(); not called by the template.exporttemplate: bank export template from the statement row (target account + partner + remittance, amount 0), dedup on the normalised target account; right:bankexport::edit+ coremodify.
Data model
Table names carry the installation's own prefix in the database: transaction_import_staged, transaction_import_row, transaction_rule, invoice, company, transaction (mirror draft).
Known limitations
assignMultipleInvoices checks only core modify, neither the assign function right nor content scope. unidentified, assignBankaccount and insert also check only core modify.