AbstractPurchasePriceAssignment

Implements \Iterator

Base class for all pricing types (classes). Pricing are used to assign purchase prices to a given number of items. A pricing consists of one or more price items. A price item comprises a purchase price together with its applicability (number of items the purchase price can be applied to) and, if it exists, a reference to the related incoming history entry. The price items form a partition in the following sense: the sum of the applicabilities of all price items equal the given number of items, which should be priced using the pricing.

package

Default

Methods

__construct

__construct(\Shopware\Components\Model\ModelManager $entityManager, \Shopware\Models\Article\Detail $articleDetail, \Shopware\CustomModels\ViisonPickwareERP\Warehouse\Warehouse $warehouse, integer $quantity) 

Arguments

$entityManager

\Shopware\Components\Model\ModelManager

$articleDetail

\Shopware\Models\Article\Detail

$quantity

integer

Returns the list item, which is referenced by the list pointer.

current() : \Shopware\Plugins\ViisonPickwareERP\Components\StockLedger\PurchasePriceAssignment\AssignablePurchasePrice

Returns the default purchase price of the article associated with the instance.

getDefaultPrice() : float

Response

float

Returns the current position of the list pointer.

key() : integer

Response

integer

Moves the list pointer to the next list item.

next() 

Resets the list pointer to its initial state.

rewind() 

Checks if the list pointer points to a list item.

valid() : boolean

Response

boolean