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.
| Table | Role | Main fields |
|---|---|---|
contir_rule | coding rule | rule 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
- Required: invoice type, customer, item name (except type 3), net and gross ledger account, posting name.
- New rule:
addContirRule(). - Delete (
delete): physical delete; the code logs the selection withprint_r.
Permissions
list(UNMAPPED) ingetList();index()checks no right.- The header + button shows with
canAction(add)(theaddkey is not in the seeds); the form checkscanSave,saveanddeleteonly coremodify. - 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.