Document list — filters, states, deletion and rights
The transaction list query and scope, the status endpoints, import-group deletion, the exports and the endpoints that only check core rights.
The finance/transaction module handles bank, cash and miscellaneous documents (header + items), invoice settlements, opening balances, the average rate chain and the balance blocks. Every insert goes through the shared addTransaction() method.
Data model
Table names carry the installation's own prefix in the database.
| Table | Role |
|---|---|
transaction, transaction_item | document header and items; status values per endpoint: 0 (reset to draft), 1 (finalised), 2 (restore, re-include), 5 (excluded), 9 (trash) |
transaction_settlement | invoice settlement link |
bankaccount, cashregister | bank account and cash register |
entry | ledger entries (read, export) |
List
Filters: company/companies, bank account, partner, direction, type, payment type, status, date type and range, statement, import row, item name, label, source, foreign currency/HUF, overdue, with/without items. The list is narrowed to the intersection of the requested companies and the scope; an empty scope gives no rows. The list right is needed for the list, the form, the monthly turnover (monthly), the export (export, getLedgerRows, CSV/PDF; without a company group or client error_export_filter) and the downloads (download, download_www, documentInScope). The balances block is super admin or core access only.
Endpoints that only check core rights
The following only check core modify (or access), no function right and — unless noted — no content scope:
delete: deletes per import group; if the group has a finalised (status 1) or posted document, no member is deleted; otherwisedeleteTransactionWithRollback()(settlements removed, outstanding recalculated, the import row becomes “New” when the last member is deleted).finalizeselected: bulk finalisation (status 1), then invoice and bank account balance recalculation.statusnull(0),statusdisable(9),statusenable(2),statusexclude(5),statusinclude(2),statuscontirnull(2 + item coding status 0),togglestatus.cashpay: finalises a draft document as a cash payment (markCashPayment), scope on the cash register's company.unlinksettle: detaches an invoice (unlinkSettlement).updateinvoicedata: sets the header total to the sum of the items.csv: RLB import file (Dlbtrlb::header/row), Windows-1252 encoded.deleteitems,deletecontirs: delete items and codings — coreaccessonly.truncateTableTransaction: emptiestransaction,transaction_item,transaction_document,transaction_import_row,transaction_import_staged;truncateTableTransactionContirs: emptiesentry,entry_itemand resets the coding status of every invoice — both coremodifyonly.
Permission keys
list(UNMAPPED),debug(SQL and EXPLAIN; not in the seeds).statusdelete(BASE) exists only in the seed; trashing (statusdisable) checks only coremodify.- The import row link depends on
canSeeandcanActionforbank/bankimport::list.