PDSAdvancedPricing.averageAdjustedUnitPrice Method [AX 2012]

Progressively gets the adjusted unit price as a weighted average.

public Price averageAdjustedUnitPrice(PDSPricingPrecision _pricingPrecision, [Qty _qty])

Run On

Server

Parameters

_pricingPrecision
Type: PDSPricingPrecision Extended Data Type
The precision to use when returning the adjusted unit price.
_qty
Type: Qty Extended Data Type
The batch quantity to be applied to the adjusted unit price (result of the equation with the current values). Optional.

Return Value

Type: Price Extended Data Type
The adjusted unit price as a weighted average.

Each call of this method will keep track of the specified quantities and the resulting adjusted unit prices allowing it to recompute the weighted average progressively. Passing 0 for _qty_qty will simply return the current weighted average. The method reset will essentially reset the weighted average back to zero.

Community Additions

ADD
Show: