Products and services – system description

The shared item base class, the two tables and their website links, saving, status and deletion blocked by contract references.

The product and service modules share an abstract base class (kind: product / service). A global master without company scope; the base class route cannot be called on its own.

Data model

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

TableRole
product, servicecode, name, unit, unit price, VAT, category, note, status
product_to_store, service_to_storewebsite link
contract_itemread: delete protection

Units come from the unit-of-measure library: material units for products, time/occasion units for services.

Process

  1. List: filter by name/code, category, status and website; websites per row.
  2. Save: name required; addItem/editItem, websites from item_store[], defaulting to website 0. Status: setStatus.
  3. Delete: if any selected item is referenced by a contract line, none is deleted (error_has_links), otherwise all.

Permissions

  • Function rights on the product and service routes: list; edit (form, status, header Add); save canSave() – with no add row, edit decides; delete; debug.
  • No content scope.

Known limitations

The status icons are rendered even without the right; the endpoint refuses.