Cash registers – system description
Data model of the cash register master, save rules, content scope and reference-protected deletion.
Cash register master per client: company, name, currency, ledger account, status. The content scope is the register's company; the list also calculates balances from the vouchers.
Data model
Table names carry the installation's own prefix in the database.
| Table | Role | Relation |
|---|---|---|
cashregister | register: company, name, currency, ledger account, status | company |
transaction | cash vouchers; balance (getCashBalances), delete protection | register id |
Process
- List: filter by company group/company, name and status, always narrowed to the allowed companies (
getCompanyGroupFilter); paging slices the full result in PHP. - Save: company required, name at least 2 characters, currency 3 capitals, ledger account 1–16 digits; both the new and the old company must be in scope;
saveCashregister(), logged. A database error returnsDB: …. - Status:
setStatus()after the scope check. - Delete: scope check per selected row;
deleteCashregister()deletes only without references, otherwise returnserror_linkedwith the reference count and stops.
Permissions
- Function rights:
list;edit(form, status and the header Add button); save viacanSave()– with noaddrow in the catalogue,editdecides;delete;debug. Changes need coremodify. - Content scope: the register's company in every operation. Company picker:
filtercompanies(shared picker,listright).
Known limitations
The statusdelete key is classified BASE but the controller does not implement it: there is no trash state, only physical deletion.