# | Column Name | Nullable | Data Type | Max Length | Description |
---|---|---|---|---|---|
1 | item_cost_price_id | bigint | 0 | The primary key of this table, which is also a bigserial field. | |
2 | item_id | integer | 0 | Foreign key to the table core.items. | |
3 | entry_ts | timestamp with time zone | 0 | ||
4 | unit_id | integer | 0 | Foreign key to the table core.units. | |
5 | party_id | bigint | 0 | Foreign key to the table core.parties | |
6 | lead_time_in_days | integer | 0 | Time taken by the good to arrive in stock after it is ordered. | |
7 | includes_tax | boolean | 0 | Tick if tax is to be included on the price of the item. | |
8 | price | money_strict | 0 | Cost price of the item. | |
9 | audit_user_id | integer | 0 | Contains the id of the user who last inserted or updated the corresponding row. | |
10 | audit_ts | timestamp with time zone | 0 | Contains the date and timestamp of the last insert or update action. |
# | Column Name | Key Name | References |
---|---|---|---|
2 | item_id | item_cost_prices_item_id_fkey | core.items.item_id |
4 | unit_id | item_cost_prices_unit_id_fkey | core.units.unit_id |
5 | party_id | item_cost_prices_party_id_fkey | core.parties.party_id |
9 | audit_user_id | item_cost_prices_audit_user_id_fkey | office.users.user_id |
Index Name | Owner | Access Method | Definition | Description |
---|---|---|---|---|
item_cost_prices_pkey | postgres | btree | item_cost_price_id |
Constraint Name | Description |
---|---|
item_cost_prices_unit_chk CHECK (core.is_valid_unit(item_id, unit_id)) |
# | Column Name | Default |
---|---|---|
1 | item_cost_price_id | nextval('core.item_cost_prices_item_cost_price_id_seq'::regclass) |
3 | entry_ts | now() |
6 | lead_time_in_days | 0 |
7 | includes_tax | false |
10 | audit_ts | now() |
Trigger Name | Targets | On Event | Timing | Condition | Order | Orientation | Description |
---|