StockInitializationService

Implements \Shopware\Plugins\ViisonPickwareERP\Components\StockLedger\StockInitialization, \Enlight_Hook

package

Default

Methods

__construct

__construct(\Zend_Db_Adapter_Pdo_Abstract $database, \Shopware\Components\Model\ModelManager $entityManager, \Shopware\Plugins\ViisonPickwareERP\Components\StockLedger\StockLedgerService $stockLedgerService, \Shopware\Plugins\ViisonPickwareERP\Components\Warehouse\WarehouseIntegrity $warehouseIntegrity) 

Arguments

$database

\Zend_Db_Adapter_Pdo_Abstract

$entityManager

\Shopware\Components\Model\ModelManager

getActualStockForArticle

getActualStockForArticle(\Shopware\Models\Article\Detail $articleDetail) : integer

Arguments

$articleDetail

\Shopware\Models\Article\Detail

Response

integer

getAllUninitializedArticleDetails

getAllUninitializedArticleDetails() : array
inheritdoc

Response

array

getAllUninitializedArticleDetailsIncludingUnmanagedArticles

getAllUninitializedArticleDetailsIncludingUnmanagedArticles() : array
inheritdoc

Response

array

getPaginatedUninitializedArticleDetails

getPaginatedUninitializedArticleDetails(string|null $filterStr, string|null $orderBy, string|null $direction,  $offset,  $rowCount) : array
inheritdoc

Arguments

$filterStr

string|null

$orderBy

string|null

$direction

string|null

$offset

$rowCount

Response

array

Performs stock initialization for a batch of article details which are not already initialized.

initializeStocksForABatchOfUninitializedArticleDetails(integer|null $batchSize = self::DEFAULT_BATCH_SIZE) : integer
inheritdoc

Arguments

$batchSize

integer|null

Response

integer

The number of stocks which are not yet initialized

Performs stock initialization for all article details which are not already initialized.

initializeStocksOfAllUninitializedArticleDetails() 
inheritdoc

Initializes the stock and bin location mappings of all passed `$articleDetails`, if necessary. Any stock change resulting from the initialization will be done in the default warehouse.

initializeStocksOfArticleDetails(array $articleDetails) 
inheritdoc

Arguments

$articleDetails

array

Constants

A sub query that matches all s_order rows whose status is one of 'aborted', 'cancelled' or 'completely delivered'.

CONDITION