Add-on packages – system description

The package, item and store tables, save validation, the two kinds of deletion with the separate permanent-delete path, and the permission keys.

Overview

Separately priced add-on packages (quantities of functions, products, services) that can be ordered in the catalogue; ordering grants an allowance in the resource ledger (Dlbtresource). Table names carry the installation's own prefix in the database: package, package_item, package_to_store.

Saving

  1. Permission: canSave($route, package_id) on the form, the item search (package.itemsearch, shared Dlbtbilling::searchItems) and the save.
  2. Fields: code, name, description, list price (required, > 0), currency, VAT, validity (days), sort order, status, stores, items (type, id, quantity).
  3. Errors: error_code, error_name, error_price.

Deletion

  • delete: if an order_item refers to the package nothing is deleted (error_in_use); otherwise physical deletion. With only delete the delete button deletes physically; with both permissions physical deletion runs only with the purge=1 parameter, as a separate icon.
  • statusdelete: status = 9.
  • The bin (Deleted filter) is visible only with canSeeDeleted (delete permission or super).

Permissions

Keys: list, add, edit, delete, statusdelete, debug; not classified in the seeds.

Related topics: add-on package permissions