Метод |
Описание |
|
addToLocation ( integer | float | string $quantity, Model $location, string $reason = '', integer | float | string $cost ) : array |
Alias for the put function. |
|
addToManyLocations ( integer | float | string $quantity, array $locations = [], string $reason = '', integer | float | string $cost ) : array |
Alias for the putToMany function. |
|
bootInventoryTrait ( ) |
Overrides the models boot function to set the user
ID automatically to every new record. |
|
category ( ) : Illuminate\Database\Eloquent\Relations\HasOne |
The hasOne category relationship. |
|
createSku ( string $code, boolean $overwrite = false ) : mixed | boolean |
Creates an SKU with the specified code. If overwrite is true,
the current items SKU will be deleted if it exists before creating
then SKU. If overwrite is false but the item has an SKU, an exception
is thrown. |
|
createStockOnLocation ( integer | float | string $quantity, Model $location, string $reason = '', integer | float | string $cost, string $aisle = null, string $row = null, string $bin = null ) : Model |
Creates a stock record to the current inventory item. |
|
findBySku ( string $sku ) : boolean |
Returns an item record by the specified SKU code. |
|
generateSku ( ) : boolean | mixed |
Generates an item SKU record. |
|
getMetricSymbol ( ) : string | null |
Returns the inventory's metric symbol. |
|
getSku ( ) : null | string |
Returns the item's SKU. |
|
getSkuCodeAttribute ( ) : null | string |
Laravel accessor for the current items SKU. |
|
getStockFromLocation ( Model $location ) : mixed |
Retrieves an inventory stock from a given location. |
|
getTotalStock ( ) : integer | float |
Returns the total sum of the current item stock. |
|
hasCategory ( ) : boolean |
Returns true/false if the current item has a category. |
|
hasMetric ( ) : boolean |
Returns true/false if the inventory has a metric present. |
|
hasSku ( ) : boolean |
Returns true/false if the current item has an SKU. |
|
isInStock ( ) : boolean |
Returns true/false if the inventory has stock. |
|
metric ( ) : Illuminate\Database\Eloquent\Relations\HasOne |
The hasOne metric relationship. |
|
moveStock ( Model $fromLocation, Model $toLocation ) : mixed |
Moves a stock from one location to another. |
|
newStockOnLocation ( Model $location ) : Model |
Instantiates a new stock on the specified
location on the current item. |
|
putToLocation ( integer | float | string $quantity, Model $location, string $reason = '', integer | float | string $cost ) : array |
Puts the specified amount ($quantity) of stock into the specified stock location. |
|
putToManyLocations ( integer | float | string $quantity, array $locations = [], string $reason = '', integer | float | string $cost ) : array |
Puts the specified amount ($quantity) of stock into the specified stock locations. |
|
regenerateSku ( ) : boolean | mixed |
Regenerates the current items SKU by
deleting its current SKU and creating
another. This will also generate an SKU
if one does not exist. |
|
removeFromLocation ( integer | float | string $quantity, $location, string $reason = '' ) : array |
Alias for the take function. |
|
removeFromManyLocations ( integer | float | string $quantity, array $locations = [], string $reason = '' ) : array |
Alias for the takeFromMany function. |
|
sku ( ) : Illuminate\Database\Eloquent\Relations\HasOne |
The hasOne SKU relationship. |
|
stocks ( ) : Illuminate\Database\Eloquent\Relations\HasMany |
The hasMany stocks relationship. |
|
suppliers ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany |
The belongsToMany suppliers relationship. |
|
takeFromLocation ( integer | float | string $quantity, Model $location, string $reason = '' ) : array |
Takes the specified amount ($quantity) of stock from specified stock location. |
|
takeFromManyLocations ( integer | float | string $quantity, array $locations = [], string $reason = '' ) : array |
Takes the specified amount ($quantity) of stock from the specified stock locations. |
|
updateSku ( string $code, null $sku = null ) : mixed | boolean |
Updates the items current SKU or the SKU
supplied with the specified code. |
|