prices
Item prices per price list with rebates and discounts.
| Name | Type | Nullable | Default Value | Notes |
|---|---|---|---|---|
PKID | bigint | Price ID | ||
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) | |
item items.ID | integer | Item ID (**dependency**) | ||
pricelist pricelists.ID | integer | Price list ID (**dependency**) | ||
price | double precision | Price per unit (`null`=`item.sellingprice` for billing or `null`=`item.purchaseprice` for procurement) | ||
rebate | double precision | 0 | Absolute rebate per unit (applied before `discount`) | |
discount | double precision | Relative discount in percent (applied after `rebate`; `null`=`pricelist.discount`) | ||
minamount | double precision | 0 | Minimum amount (quantity) | |
costprice | double precision | Cost price per unit (`null`=`item.purchaseprice` for billing) |
| Name | Unique | Nulls Distinct | Primary | Partial | Method | Keys |
|---|---|---|---|---|---|---|
| fk_prices_item | btree | item | ||||
| fk_prices_pricelist | gin | pricelist | ||||
| pk_prices | btree | ID |
| Name | Type |
|---|---|
| dc_prices_discount | check |
| dc_prices_minamount | check |
| fk_prices_item | foreign_key |
| fk_prices_pricelist | foreign_key |
| pk_prices | primary_key |
Loading...