Methods
__construct
__construct(\Shopware\Components\Model\ModelManager $entityManager, \Shopware\Plugins\ViisonPickwareERP\Components\StockLedger\StockChangeList\StockChangeListFactory $stockChangeListFactory, \Shopware\Plugins\ViisonPickwareERP\Components\DerivedPropertyUpdater\DerivedPropertyUpdater $derivedPropertyUpdater, \Shopware\Plugins\ViisonPickwareERP\Components\StockLedger\StockLedgerService $stockLedgerService, \Shopware\Plugins\ViisonPickwareERP\Components\OrderDetailQuantityCalculator\OrderDetailQuantityCalculator $orderDetailQuantityCalculator)
Arguments
$entityManager
\Shopware\Components\Model\ModelManager
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>
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 $stockChanges) : array<mixed,\Shopware\CustomModels\ViisonPickwareERP\StockLedger\OrderStockReservation>