Table core.item_cost_prices
This table stores information on cost price of a item and other associated informations.
# Column Name Nullable Data Type Max Length Description
1item_cost_price_idbigint0The primary key of this table, which is also a bigserial field.
2item_idinteger0Foreign key to the table core.items.
3entry_tstimestamp with time zone0
4unit_idinteger0Foreign key to the table core.units.
5party_idbigint0Foreign key to the table core.parties
6lead_time_in_daysinteger0Time taken by the good to arrive in stock after it is ordered.
7includes_taxboolean0Tick if tax is to be included on the price of the item.
8pricemoney_strict0Cost price of the item.
9audit_user_idinteger0Contains the id of the user who last inserted or updated the corresponding row.
10audit_tstimestamp with time zone0Contains the date and timestamp of the last insert or update action.

Foreign Keys

# 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

Indices

Index Name Owner Access Method Definition Description
item_cost_prices_pkey postgres btree item_cost_price_id

Check Constraints

Constraint Name Description
item_cost_prices_unit_chk
CHECK (core.is_valid_unit(item_id, unit_id))

Default Values

# 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()

Triggers

Trigger Name Targets On Event Timing Condition Order Orientation Description