virtual_warehouse.data.data_model.Inventory¶
- class Inventory(name=None, namespace=None, **kargs)[source]¶
Bases:
virtual_warehouse.data.data_model.ItemInstance
Description of inventory balance instance for given (date, location, item).
- name¶
unique ID of inventory object
- Type
str
- has_date¶
date of the inventory status
- Type
datetime.datetime
- has_location¶
location object related to this inventory status
- Type
RackLocation
- # has_ltype
location type
- Type
str
- has_expiry_date¶
date of the item expiration
- Type
datetime.datetime
- has_available_qty¶
available quantity of the item
- Type
int
- has_onhand_qty¶
on-hand quantity of the item
- Type
int
- has_transit_qty¶
transiting quantity of the item
- Type
int
- has_allocated_qty¶
allocated quantity of the item
- Type
int
- has_suspense_qty¶
suspended quantity of the item
- Type
int
- INIT DESCRIPTION
Methods
create
(date, location_id, ltype, item_id, …)Destroy all instances of Inventory class.
get_by_item
(item, date)Get list of inventories containing item on given date.
Attributes
Full Description
- classmethod create(date, location_id, ltype, item_id, expiry_date, available_qty, onhand_qty, transit_qty, allocated_qty, suspense_qty)[source]¶
- Parameters
date (datetime.datetime) –
location_id (str) –
ltype (str) –
item_id (str) –
expiry_date (str) –
available_qty (int) –
onhand_qty (int) –
transit_qty (int) –
allocated_qty (int) –
suspense_qty (int) –
- static get_by_item(item, date)[source]¶
Get list of inventories containing item on given date.
- Parameters
item (Item) – item object to look for.
date (datetime.datetime) – date of inventory
- Returns
List[Item] – list of items stored at locations
- is_a = [onto.ItemInstance]¶
- namespace = get_ontology("http://warehouse/onto.owl#")¶
- storid = 306¶