Ledger entries — data model, correction, export, limitations

The header and line tables of the coding documents, the transactional save of manual corrections, the RLB export, deletion and the module’s known gaps.

The finance/entry module lists ledger entries (coding documents), allows manual correction and exports them in RLB format. The module is under development.

Data model

Table names carry the installation's own prefix in the database.

TableRoleMain fields
entrycoding document headerposting date, exported_at, linked invoice
entry_itemlinesnet and gross legs: ledger_net, ledger_gross, amounts
invoice_entry_datethe invoice's posting dateremoved on delete

The list also reads invoice, company, transaction.

Manual correction (save, entry_id > 0)

  1. Per line the ledger account has 2–8 digits (error_entry_ledger), the amount is a number (error_entry_amount), at least one line (error_entry_no_items).
  2. Debit and credit totals may differ by at most 0.01 (error_entry_unbalanced).
  3. replaceEntryItems() replaces the lines in a transaction; the posting date is rewritten and exported_at is cleared.

Further endpoints (core right only)

  • delete: for an invoice-type entry the invoice status becomes 2 and the invoice_entry_date row is removed; then a physical delete (deleteEntry). Core modify only.
  • csv: RLB import file from the selected entries (Dlbtrlb, payment type code mapping, VAT side), ISO-8859-2 encoded; exported entries get exported_at. Core modify only.
  • companygroup: member companies of a group with scope; core access.

Permissions

  • list (UNMAPPED) in getList(); edit on the form (canSave) and on save together with core modify; debug (legacy permission table only).
  • The filter's company picker is scoped, but the list query and the correction get no content scope condition.

Known limitations

  • The add key is not in the seeds; the legacy “new entry” branch (entry_id = 0) passes the POST to addInvoice() (notify_source = 'ledger entry'), i.e. it creates an invoice, not a ledger entry.
  • The list's deleteitems link points to a method that does not exist in the controller.
  • The list query applies no content scope.