Account coding rule store — data model and known defects

The rule table of general account coding, the rule types, the save checks, the rights and the known defect of editing.

The rule store of general account coding: invoice type + customer (+ supplier) + item name pattern → ledger accounts (net, VAT, gross). The store is read by the contir/general adapter and the recognition service (dlbtrecognise).

Data model

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

TableRoleMain fields
contir_rulecoding rulerule type (1 = by item name, 2 = without supplier, 3 = without item name, written ??), invoice type, customer, supplier, item name, net/VAT/gross ledger account, posting name, sort_order, status

The form reads the finance/invoice, masterdata/invoicetype and company/company models (pre-fill from an invoice).

Save

  1. Required: invoice type, customer, item name (except type 3), net and gross ledger account, posting name.
  2. New rule: addContirRule().
  3. Delete (delete): physical delete; the code logs the selection with print_r.

Permissions

  • list (UNMAPPED) in getList(); index() checks no right.
  • The header + button shows with canAction(add) (the add key is not in the seeds); the form checks canSave, save and delete only core modify.
  • The module checks no content scope.

Known limitations

Judging by the code, editing does not work: the controller calls editContirRule($data) with one parameter, while the model signature is editContirRule(int $id, array $data), and it would only write sort_order and status.
Related topics: account coding permissions