The StockRepositoryContract is the interface for the stock repository. This interface allows you to find, create and update stock. Stock is assigned to one variation and is stored in warehouses.
Plenty\Modules\StockManagement\Stock\Contracts
public listStockByWarehouseId(int $warehouseId, array $columns = [], int $page = 1, int $itemsPerPage = 50):PaginatedResult
List stock of a warehouse
int | $warehouseId | The ID of the warehouse |
array | $columns | The properties to be loaded |
int | $page | The requested page |
int | $itemsPerPage | The number of items per page |
public listStock(array $columns = [], int $page = 1, int $itemsPerPage = 50):PaginatedResult
List stock
array | $columns | The properties to be loaded |
int | $page | The requested page |
int | $itemsPerPage | The number of items per page |
public listStockByWarehouseType(string $type, array $columns = [], int $page = 1, int $itemsPerPage = 50):PaginatedResult
List stock by warehouse type
string | $type | The type of the warehouse. Currently only 'sales' is supported. |
array | $columns | The properties to be loaded |
int | $page | The requested page |
int | $itemsPerPage | The number of items per page |
public correctStock(int $warehouseId, array $data):void
Corrects stock. The ID of the warehouse has to be provided.
int | $warehouseId | The ID of the warehouse. |
array | $data | The request data. |
public bookIncomingItems(int $warehouseId, array $data):void
Book incoming stock
int | $warehouseId | The ID of the warehouse |
array | $data | The request data |
public bookOutgoingItems(int $warehouseId, array $data):void
Book outgoing stock
int | $warehouseId | The ID of the warehouse |
array | $data | The request data |
public redistributeStock(array $data):void
Redistribute stock
array | $data | The request data |
public listStockMovements(int $warehouseId, array $columns = [], int $page = 1, int $itemsPerPage = 50):PaginatedResult
List stock movements
int | $warehouseId | The ID of the warehouse |
array | $columns | The properties to be loaded |
int | $page | The requested page |
int | $itemsPerPage | The number of items per page |
public unpackVariation(int $warehouseId, array $variationStockIntake, array $variationStockCorrection):Warehouse
Unpack variation
int | $warehouseId | The ID of the warehouse |
array | $variationStockIntake | |
array | $variationStockCorrection |
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters(array $filters = []):void
Sets the filter array.
array | $filters |
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
The StockStorageLocationRepositoryContract is the interface for the stock storage location repository. This interface allows you to list the stock of all storage locations of a warehouse or to list all storage locations of a variation and the stock stored at these locations.
Plenty\Modules\StockManagement\Stock\Contracts
public listStockStorageLocationsByWarehouseId(int $warehouseId, array $columns = [], int $page = 1, int $itemsPerPage = 50, array $with = []):PaginatedResult
List stock of all storage locations of a warehouse
int | $warehouseId | The ID of the warehouse |
array | $columns | The properties to be loaded |
int | $page | The requested page |
int | $itemsPerPage | The number of items per page |
array | $with | The relations to load in the StockStorageLocationInstance, possible is: storageLocation |
public listStockStorageLocationsByVariationId(int $variationId, array $columns = [], int $page = 1, int $itemsPerPage = 50, array $with = [], string $sortBy = "id", string $sortOrder = "asc"):PaginatedResult
List stock of a variation per storage location
int | $variationId | The ID of the variation. |
array | $columns | The properties to be loaded |
int | $page | The requested page |
int | $itemsPerPage | The number of items per page |
array | $with | The relations to load in the StockStorageLocationInstance, possible is: storageLocation |
string | $sortBy | [optional] |
string | $sortOrder | [optional, default=asc] |
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters(array $filters = []):void
Sets the filter array.
array | $filters |
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
The stock model. There are 4 different stock terms used in plentymarkets. The physical stock, the net stock, the reserved stock and the stock reserved for listings.
Plenty\Modules\StockManagement\Stock\Models
Type | Name | Description |
---|---|---|
int | itemId | The ID of the item |
int | variationId | The ID of the variation |
int | warehouseId | The ID of the warehouse |
float | stockPhysical | The physical stock |
float | reservedStock | The reserved stock |
float | reservedEbay | The stock reserved for ebay |
float | reorderDelta | The reorder delta |
float | stockNet | The net stock |
int | reordered | The reordered quantity of a variation |
int | warehousePriority | The priority of the warehouse |
float | reservedBundle | Reserved bundle |
float | averagePurchasePrice | The average purchase price |
updatedAt | The time the stock was last updated |
public toArray()
Returns this model as an array.
The stock batch best before date model contains all information about the batch and best before date.
Plenty\Modules\StockManagement\Stock\Models
Type | Name | Description |
---|---|---|
string | batch | |
string | bestBeforeDate |
public toArray()
Returns this model as an array.
The stock storage location model contains all information about the stock that is stored at one storage location.
Plenty\Modules\StockManagement\Stock\Models
Type | Name | Description |
---|---|---|
int | itemId | The ID of the item |
int | variationId | The ID of the variation |
int | storageLocationId | The ID of the storage location. |
int | warehouseId | The ID of the warehouse that the storage location is in |
float | quantity | The quantity stored at the storage location |
string | bestBeforeDate | The best before date |
string | batch | The batch |
updatedAt | The day and time the stock was last updated | |
StorageLocation | storageLocation | Deprecated! Use warehouseLocation instead |
WarehouseLocation | warehouseLocation | The warehouse location of the item |
Variation | variation | The variation of the item |
public toArray()
Returns this model as an array.
The WarehouseRepositoryContract is the interface for the warehouse repository. This interface allows you to either get one warehouse by specifying the id or to list all warehouses.
Plenty\Modules\StockManagement\Warehouse\Contracts
public findById(int $warehouseId, array $with = []):Warehouse
Get a warehouse
int | $warehouseId | The id of the warehouse. |
array | $with | The relations to load in the warehouse instance. repairWarehouse is the only relation currently available. |
public all(array $with = [], array $columns = []):array
List warehouses
array | $with | The relations to load in the warehouse instance. repairWarehouse is the only relation currently available. |
array | $columns | The columns to load in the response |
public create(array $data):Warehouse
Create a warehouse
array | $data | The request data. |
The warehouse model in plentymarkets represents actual warehouses. Every warehouse is identified by an Id. Furthermore a warehouse is described by a name and is always associated with an address. This address may not only contain a physical address information like a street, a house number, a postal code and a town, but also an email address, a telephone number or a fax number.
Plenty\Modules\StockManagement\Warehouse\Models
Type | Name | Description |
---|---|---|
int | id | The id of the warehouse |
string | name | The name of the warehouse |
string | note | A note for this warehouse |
int | typeId | The id of the warehouse type. The following types are available:
|
array | allocationReferrerIds | Allocation Referrer Ids by automatic warehouse detection |
int | onStockAvailability | Displayed availability of a variation if stock is available |
int | outOfStockAvailability | Displayed availability of a variation if no stock is available |
bool | splitByShippingProfile | Flag that indicates if for this warehouse orders are split by shipping profiles or not.
|
string | storageLocationType | The storage location type. The following types are available:
|
int | storageLocationZone | The zone that the storage location is in |
int | repairWarehouseId | The id of the associated repair warehouse |
bool | isInventoryModeActive | Flag that indicates if the inventory mode for this warehouse is active or not.
|
string | logisticsType | The id of the logistics type of the warehouse. The logistics type states which service provider fulfills the storage and shipping. The following logistics types are available:
|
Address | address | The address that the warehouse is located at |
Warehouse | repairWarehouse | All information about the repair warehouse if a repair warehouse is linked to the sales warehouse |
string | updatedAt | The updated at timestamp of the warehouse |
string | createdAt | The created at timestamp of the warehouse |
public toArray()
Returns this model as an array.
The RackManagementRepositoryContract is the interface for the rack management repository. This interface provides the functionality to manage the warehouse configuration for racks. Racks can be retrieved, created or updated here.
Plenty\Modules\StockManagement\Warehouse\Management\Contracts
public getRackById(int $rackId, array $columns = [], array $with = []):Rack
Find a rack by id.
int | $rackId | The id of the rack. |
array | $columns | The attributes to be loaded. |
array | $with | The relations to be loaded. Possible values are 'warehouse', 'shelves' and 'storageLocations'. |
public findRacks(int $page = 1, int $itemsPerPage = 50, array $columns = [], array $with = []):PaginatedResult
Find racks. The results can be filtered by warehouse id.
int | $page | The requested page. |
int | $itemsPerPage | Number of items per page. |
array | $columns | The attributes to be loaded. |
array | $with | The relations to be loaded. Possible values are 'warehouse', 'shelves' and 'storageLocations'. |
public createRack(array $data, int $warehouseId):Rack
Create a new rack.
array | $data | The data to create a new rack. |
int | $warehouseId | The id of the warehouse the rack shall belong to. |
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters(array $filters = []):void
Sets the filter array.
array | $filters |
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
The ShelfManagementRepositoryContract is the interface for the shelf management repository. This interface provides the functionality to manage the warehouse configuration for shelves. Shelves can be retrieved, created or updated here.
Plenty\Modules\StockManagement\Warehouse\Management\Contracts
public getShelfById(int $shelfId, array $columns = [], array $with = []):Shelf
Find a shelf by id.
int | $shelfId | The id of the shelf. |
array | $columns | The attributes to be loaded. |
array | $with | The relations to be loaded. Possible values are 'warehouse', 'rack' and 'storageLocations'. |
public findShelves(int $page = 1, int $itemsPerPage = 50, array $columns = [], array $with = []):PaginatedResult
Find shelves. The results can be filtered by warehouse id and rack id.
int | $page | The requested page. |
int | $itemsPerPage | Number of items per page. |
array | $columns | The attributes to be loaded. |
array | $with | The relations to be loaded. Possible values are 'warehouse', 'rack' and 'storageLocations'. |
public createShelf(array $data, int $warehouseId, int $rackId):Shelf
Create a new shelf.
array | $data | The data to create a new shelf. |
int | $warehouseId | The id of the warehouse the shelf shall belong to. |
int | $rackId | The id of the rack the shelf shall belong to. |
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters(array $filters = []):void
Sets the filter array.
array | $filters |
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
The StorageLocationManagementRepositoryContract is the interface for the storage location management repository. This interface provides the functionality to manage the warehouse configuration for storage locations. Storage locations can be retrieved, created or updated here.
Plenty\Modules\StockManagement\Warehouse\Management\Contracts
public getStorageLocationById(int $storageLocationId, array $columns = [], array $with = []):StorageLocation
Find a storage location by id.
int | $storageLocationId | The id of the storage location. |
array | $columns | The attributes to be loaded. |
array | $with | The relations to be loaded. Possible values are 'warehouse', 'rack' and 'shelf'. |
public findStorageLocations(int $page = 1, int $itemsPerPage = 50, array $columns = [], array $with = []):PaginatedResult
Find storage locations. The results can be filtered by warehouse id, rack id and shelf id.
int | $page | The requested page. |
int | $itemsPerPage | Number of items per page. |
array | $columns | The attributes to be loaded. |
array | $with | The relations to be loaded. Possible values are 'warehouse', 'rack' and 'shelf'. |
public createStorageLocation(array $data, int $warehouseId, int $rackId, int $shelfId):StorageLocation
Create a new storage location.
array | $data | The data to create a new storage location. |
int | $warehouseId | The id of the warehouse the storage location shall belong to. |
int | $rackId | The id of the rack the storage location shall belong to. |
int | $shelfId | The id of the shelf the storage location shall belong to. |
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters(array $filters = []):void
Sets the filter array.
array | $filters |
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
The storage rack model
Plenty\Modules\StockManagement\Warehouse\Management\Models
Type | Name | Description |
---|---|---|
int | id | The id of the rack. |
int | name | The name of the rack. |
int | position | The position of the rack. |
int | warehouseId | The id of the warehouse the rack belongs to. |
int | zone | The zone of the rack. Numbers between 1 and 20 are valid. |
Warehouse | warehouse | The warehouse this rack belongs to. |
shelves | The shelves that belong to this rack. | |
storageLocations | The storage locations that belong to this rack. |
public toArray()
Returns this model as an array.
The storage shelf model
Plenty\Modules\StockManagement\Warehouse\Management\Models
Type | Name | Description |
---|---|---|
int | id | The id of the shelf. |
int | rackId | The id of the rack the shelf belongs to. |
string | name | The name of the shelf. |
int | level | The level of the shelf. Numbers between 1 and 25 are valid. |
Rack | rack | The rack this shelf belongs to. |
storageLocations | The storage locations of this shelf. |
public toArray()
Returns this model as an array.
The storage location model
Plenty\Modules\StockManagement\Warehouse\Management\Models
Type | Name | Description |
---|---|---|
int | id | The id of the storage location. |
int | warehouseId | The id of the warehouse the storage location belongs to. |
int | rackId | The id of the rack the storage location belongs to. |
int | shelfId | The id of the shelf the storage location belongs to. |
string | name | The name of the storage location. |
int | type | The type of the storage location. Valid strings are: 'small', 'medium', 'large', 'europallet'. |
int | position | The position of the storage location. |
Warehouse | warehouse | The warehouse this storage location belongs to. |
Rack | rack | The rack this storage location belongs to. |
Shelf | shelf | The shelf this storage location belongs to. |
public toArray()
Returns this model as an array.