Table core.item_opening_inventory
This table stores information on opening inventory and other associated information.
# Column Name Nullable Data Type Max Length Description
1item_opening_inventory_idbigint0The primary key of this table, which is also a serial field.
2entry_tstimestamp with time zone0
3item_idinteger0Foreign key to the table core.items.
4store_idinteger0
5unit_idinteger0Foreign key to the table core.items.
6quantityinteger0
7amountmoney_strict0
8base_unit_idinteger0
9base_quantitynumeric0
10audit_user_idinteger0Contains the id of the user who last inserted or updated the corresponding row.
11audit_tstimestamp with time zone0Contains the date and timestamp of the last insert or update action.

Foreign Keys

# Column Name Key Name References
3 item_id item_opening_inventory_item_id_fkey core.items.item_id
4 store_id item_opening_inventory_store_id_fkey office.stores.store_id
5 unit_id item_opening_inventory_unit_id_fkey core.units.unit_id
8 base_unit_id item_opening_inventory_base_unit_id_fkey core.units.unit_id
10 audit_user_id item_opening_inventory_audit_user_id_fkey office.users.user_id

Indices

Index Name Owner Access Method Definition Description
item_opening_inventory_pkey postgres btree item_opening_inventory_id

Check Constraints

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

Default Values

# Column Name Default
1 item_opening_inventory_id nextval('core.item_opening_inventory_item_opening_inventory_id_seq'::regclass)
11 audit_ts now()

Triggers

Trigger Name Targets On Event Timing Condition Order Orientation Description