items
Inventory items with pricing, barcodes, and stock settings.
| Name | Type | Nullable | Default Value | Notes |
|---|---|---|---|---|
PKID | integer | Item ID | ||
fork forks.ID | integer | Fork ID (`null` for base module) | ||
ownergroup groups.ID | integer | Owner group ID (`null`=PUBLIC) | ||
creator | integer | Creator user ID (defaults to authenticated user on creation) | ||
creationdate | bigint | date_part('epoch', now()) | Creation date and time as a Unix timestamp (defaults to current date and time on creation) | |
lastmodified | bigint | date_part('epoch', now()) | Last modification date and time as a Unix timestamp (auto-reset on modification) | |
model items.ID | integer | Model item ID; only for non-MODEL | ||
picbinfile binfiles.ID | integer | Binary file ID; is read-only (not for `PUT` or `PATCH`) | ||
visibility | smallint | 0 | Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED) | |
name | text | Product name | ||
manufacturer | text | '' | Manufacturer (brand or company name) | |
itemnum | text | '' | Item number (SKU) | |
barcode | text | '' | Barcode (e.g. GTIN, EAN or UPC code) | |
type | smallint | 0 | Item type (`0`=SIMPLE, `1`=SERIALS, `2`=CHARGES, `3`=SERIALSANDCHARGES, `4`=SET, `5`=CONTAINER, `6`=NOSTOCK, `7`=MODEL) | |
forcestock | smallint | Force stock check on depletion (`0`=STORAGE, `1`=LOCATION) | ||
applicability | smallint | 0 | Applicability (`0`=ALWAYS, `1`=NEVER, `2`=BILLINGONLY, `3`=PROCUREMENTONLY) | |
unit | character varying(3) | '' | Unit code as defined by (UN/CEFACT Recommendation 20) | |
sellingprice | double precision | 0 | Default selling price per unit | |
purchaseprice | double precision | 0 | Default purchase price per unit | |
taxrate | double precision | Tax rate in percent | ||
weight | double precision | 0 | Shipping weight per unit in kilograms | |
classcode | text | '' | Product classification code (e.g. GPC, CPV or UNSPSC code) | |
tariffcode | text | '' | Tariff code (e.g. HS, CN or HTS code) | |
origin | character varying(2) | '' | Origin country code (ISO 3166-1 alpha-2) | |
description | text | '' | Detailed general description | |
foreigntaxrates | json | Country-specific tax rates in percent; use country code as object key |
| Name | Unique | Nulls Distinct | Primary | Partial | Method | Keys |
|---|---|---|---|---|---|---|
| fk_items_fork | gin | fork | ||||
| fk_items_model | btree | model | ||||
| fk_items_ownergroup | gin | ownergroup | ||||
| fk_items_picbinfile | btree | picbinfile | ||||
| i_items_barcode | btree | barcode | ||||
| i_items_itemnum | btree | itemnum | ||||
| i_items_name | btree | name | ||||
| i_items_nofork | gin | fork | ||||
| i_items_noowner | gin | ownergroup | ||||
| pk_items | btree | ID | ||||
| s_items_barcode | gin | barcode | ||||
| s_items_itemnum | gin | itemnum | ||||
| s_items_manufacturer | gin | manufacturer | ||||
| s_items_name | gin | name |
| Name | Type |
|---|---|
| c_items_type | check |
| dc_items_applicability | check |
| dc_items_barcode | check |
| dc_items_classcode | check |
| dc_items_description | check |
| dc_items_forcestock | check |
| dc_items_foreigntaxrates | check |
| dc_items_itemnum | check |
| dc_items_manufacturer | check |
| dc_items_name | check |
| dc_items_origin | check |
| dc_items_tariffcode | check |
| dc_items_taxrate | check |
| dc_items_type | check |
| dc_items_visibility | check |
| dc_items_weight | check |
| fk_items_fork | foreign_key |
| fk_items_model | foreign_key |
| fk_items_ownergroup | foreign_key |
| fk_items_picbinfile | foreign_key |
| pk_items | primary_key |
| Name | Type | Events | Function | Definition |
|---|---|---|---|---|
| ti_items_model | before | insert | ftiu_items_model | |
| tu_items_model | before | update | ftiu_items_model | |
| tu_items_type | before | update | ft_integrity |
Loading...