ArticleDetailStockInfoProvider

Extends

package

Default

Methods

Returns the lastest stock ledger entry of the passed `$articleDetail` in the passed `$warehouse`. If the optional `$stockLedgerEntryType` is passed, the latest stock ledger entry of that type is returned.

getLatestStockLedgerEntryForWarehouse(\Shopware\Models\Article\Detail $articleDetail, \Shopware\CustomModels\ViisonPickwareERP\Warehouse\Warehouse $warehouse, string|null $stockLedgerEntryType = null) : \Shopware\CustomModels\ViisonPickwareERP\StockLedger\StockLedgerEntry|null

Arguments

$articleDetail

\Shopware\Models\Article\Detail

$stockLedgerEntryType

string|null

(optional)

Response

\Shopware\CustomModels\ViisonPickwareERP\StockLedger\StockLedgerEntry|null

Returns the current physical stock of the passed `$articleDetail` in the passed `$warehouse` as written in the lastly created stock ledger entry. Returns `0`, if no stock ledger entry exists.

getStockInWarehouse(\Shopware\Models\Article\Detail $articleDetail, \Shopware\CustomModels\ViisonPickwareERP\Warehouse\Warehouse $warehouse) : integer

Arguments

$articleDetail

\Shopware\Models\Article\Detail

Response

integer

Returns the the sum of all stock of the passed `$articleDetail` in all warehouses.

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

Arguments

$articleDetail

\Shopware\Models\Article\Detail

Response

integer

Returns the the sum of all stock of the passed `$articleDetail` in all warehouses, whose stock is available for sale in the online shop.

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

Arguments

$articleDetail

\Shopware\Models\Article\Detail

Response

integer

isStockInitialized

isStockInitialized(\Shopware\Models\Article\Detail $articleDetail) : boolean

Arguments

$articleDetail

\Shopware\Models\Article\Detail

Response

boolean

true iff the stock of the passed $articleDetail has been initialized in the stock ledger.

isStockManaged

isStockManaged(\Shopware\Models\Article\Detail $articleDetail) : boolean

Arguments

$articleDetail

\Shopware\Models\Article\Detail

Response

boolean

false iff stock changes of the passed $articleDetail are not recored by the stock ledger.