The stock level of one product SKU held at one inventory location. Inventory is tracked per location rather than per product, so a SKU stocked in three warehouses has three of these rows and the total on hand is their sum. The stock figure is what Kademi believes is present, updated as orders and stock movements are processed, and it starts at zero when the row is created. Deleting the row removes the SKU from that location entirely, as opposed to setting its stock to zero.
Group: Database Entities
Implements: Serializable, Relational
Properties
| Property | Returns | Description |
|---|---|---|
| createdBy | Profile | The profile who first added this SKU to this location. Can be null when the record was created by a background process rather than a user. |
| createdDate | Date | When this SKU was first stocked at this location. |
| id | long | The database-assigned unique identifier for this stock record. |
| location | InventoryLocation | The inventory location, ie the warehouse or store, holding the stock. Always set. |
| product | ProductSku | The product SKU being counted. Stock is tracked at SKU level, not product level, so each size or colour has its own record. Always set. |
| stock | Long | The number of units of this SKU believed to be at this location. Set to zero when the record is created, and can go negative if more has been despatched than was recorded as received. |
| updatedAt | Date | When the stock figure was last changed. Use this to tell a stale count from one that is simply unchanged. |
Methods
getId()
Returns: long
The database-assigned unique identifier for this stock record.
getStock()
Returns: Long
The number of units of this SKU believed to be at this location. Set to zero when the record is created, and can go negative if more has been despatched than was recorded as received.
getLocation()
Returns: InventoryLocation
The inventory location, ie the warehouse or store, holding the stock. Always set.
getProduct()
Returns: ProductSku
The product SKU being counted. Stock is tracked at SKU level, not product level, so each size or colour has its own record. Always set.
getCreatedBy()
Returns: Profile
The profile who first added this SKU to this location. Can be null when the record was created by a background process rather than a user.
getCreatedDate()
Returns: Date
When this SKU was first stocked at this location.
getUpdatedAt()
Returns: Date
When the stock figure was last changed. Use this to tell a stale count from one that is simply unchanged.
rowId()
Returns: Long
The database identifier for this record, as the generic row id used across Kademi entities. Same value as the id.