item_inv
- Last UpdatedNov 20, 2024
- 2 minute read
The item_inv table contains the total quantities of each item and lot number at each storage location at the current time. It contains no history of the inventory transactions that brought about the current quantities. When the qty_left value becomes 0 as the result of a transfer, consumption, or shipment, the row is deleted if that option is specified in the storage_exec table. The row_id field allows users to specify their own granularity for creating new rows or updating existing ones.
|
Field |
Datatype |
PK |
Nulls? |
Description |
|---|---|---|---|---|
|
ent_id |
int32 |
N |
N |
Storage entity identifier |
|
item_id |
string40 |
N |
N |
Item identifier |
|
lot_no |
string40 |
N |
Y |
Lot number |
|
sublot_no |
string40 |
N |
Y |
Lowest level sublot number |
|
grade_cd |
int32 |
N |
Y |
Grade of this lot in this storage entity; null if it should default to the grade_cd of the sublot or lot |
|
status_cd |
int32 |
N |
Y |
Status of this lot in this storage entity; null if it should default to the status_cd of the sublot or lot |
|
qty_left |
tfloat |
N |
N |
Quantity left |
|
qty_left_erp |
tfloat |
N |
N |
Quantity left, as last transmitted to ERP. (Default = 0) |
|
uom_id |
int32 |
N |
Y |
Unit of measure for inventory |
|
date_in_utc |
tdatetime |
N |
N |
When items last received to this lot/location in UTC |
|
date_in_local |
tdatetime |
N |
N |
When items last received to this lot/location in local_time |
|
date_out_utc |
tdatetime |
N |
Y |
When items last sent from this lot/location in UTC |
|
date_out_local |
tdatetime |
N |
Y |
When items last sent from this lot/location in local_time |
|
expiry_date_utc |
tdatetime20 |
N |
Y |
Expiry date for these items in this storage entity, in UTC |
|
expiry_date_local |
tdatetime20 |
N |
Y |
Expiry date for these items in this storage entity, in the local time of the entity at which the inventory event occurred |
|
wo_id |
string40 |
N |
Y |
Last job that produced these goods |
|
oper_id |
string40 |
N |
Y |
|
|
seq_no |
int32 |
N |
Y |
|
|
spare1 |
string80 |
N |
Y |
Use defined by language term 4772 |
|
spare2 |
string80 |
N |
Y |
Use defined by language term 4773 |
|
spare3 |
string80 |
N |
Y |
Use defined by language term 4774 |
|
spare4 |
string80 |
N |
Y |
Use defined by language term 4775 |
|
spare5 |
string80 |
N |
Y |
Use defined by language term 4776 |
|
spare6 |
string80 |
N |
Y |
Use defined by language term 4777 |
|
last_edit_comment |
notes |
N |
Y |
Reserved for internal use to indicate why this record was changed |
|
last_edit_by |
string40 |
N |
Y |
Who last changed this record |
|
last_edit_at |
tdatetime |
N |
N |
Last time this row was edited – use as mod_id also |
|
row_id |
ID 1 |
Y |
N |
Unique identifier for row (an inventory entry) |
FK from ent_id to storage_exec. (Cascade delete)
FK from item_id to item. (Cascade delete)
FK from uom_id to uom. (Set null)
FK from grade_cd to item_grade. (Inhibit delete)
FK from status_cd to item_state. (Inhibit delete)
FK from item_id, lot_no to lot. (Inhibit delete)
FK from item_id, lot_no, sublot_no to sublot. (Inhibit delete)
Index on ent_id, item_id, lot_no.