StockReservation

Extends

package

Default

Methods

Clears reserved stock by deleting the reservation from the database, before updating (reducing) the cached reserved stock of the warehouse, which the given $reservation belongs. If the given $reservedStock entity is NOT managed, only its object association to the bin location article detail is removed.

clearStockReservation(\Shopware\CustomModels\ViisonPickwareERP\StockLedger\OrderStockReservation $reservation) 

Finds any stock reservations for the given $orderDetail in the given $warehouse and removes them from the database. Finally, the cached reserved stock of the respective article detail is updated.

clearStockReservationsForOrderDetail(\Shopware\CustomModels\ViisonPickwareERP\Warehouse\Warehouse $warehouse, \Shopware\Models\Order\Detail $orderDetail) 

Arguments

$orderDetail

\Shopware\Models\Order\Detail

First removes any stock reservations of the given $orderDetail in the given $warehouse. If the remaining/open quantity (quantity - shipped) is greater zero, new stock reservations for that remaining quantity are created.

reserveOpenQuantityForOrderDetail(\Shopware\CustomModels\ViisonPickwareERP\Warehouse\Warehouse $warehouse, \Shopware\Models\Order\Detail $orderDetail) : array<mixed,\Shopware\CustomModels\ViisonPickwareERP\StockLedger\OrderStockReservation>

Finally, the cached reserved stock of the respective article detail is updated and the created stock reservations are returned.

Arguments

$orderDetail

\Shopware\Models\Order\Detail

Response

array<mixed,\Shopware\CustomModels\ViisonPickwareERP\StockLedger\OrderStockReservation>

Converts the given $stockChanges into stock reservations for the given $articleDetail and flushes them into the database.

reserveStockForStockChanges(\Shopware\Models\Article\Detail $articleDetail, \Shopware\Models\Order\Detail $orderDetail, array<mixed,\Shopware\Plugins\ViisonPickwareERP\Components\StockLedger\StockChangeList\BinLocationStockChange> $stockChanges) : array<mixed,\Shopware\CustomModels\ViisonPickwareERP\StockLedger\OrderStockReservation>

Arguments

$articleDetail

\Shopware\Models\Article\Detail

$orderDetail

\Shopware\Models\Order\Detail

Response

array<mixed,\Shopware\CustomModels\ViisonPickwareERP\StockLedger\OrderStockReservation>