GetActivePrice Method

Gets the active unit price for given sales line based on channel and customer settings.

Namespace:  Microsoft.Dynamics.Commerce.Runtime.Services.PricingEngine
Assembly:  Microsoft.Dynamics.Commerce.Runtime.Services.PricingEngine (in Microsoft.Dynamics.Commerce.Runtime.Services.PricingEngine.dll)

Syntax

'Declaration
Public Shared Function GetActivePrice ( _
    pricingDataManager As IPricingDataManager, _
    priceParameters As DiscountParameters, _
    currencyCode As String, _
    saleItem As SalesLine, _
    quantity As Decimal, _
    customerId As String, _
    customerPriceGroup As String, _
    priceIncludesTax As Boolean, _
    dateToCheck As DateTime, _
    roundingMethod As RoundingRule _
) As Decimal
'Usage
Dim pricingDataManager As IPricingDataManager
Dim priceParameters As DiscountParameters
Dim currencyCode As String
Dim saleItem As SalesLine
Dim quantity As Decimal
Dim customerId As String
Dim customerPriceGroup As String
Dim priceIncludesTax As Boolean
Dim dateToCheck As DateTime
Dim roundingMethod As RoundingRule
Dim returnValue As Decimal

returnValue = PricingEngine.GetActivePrice(pricingDataManager, _
    priceParameters, currencyCode, saleItem, _
    quantity, customerId, customerPriceGroup, _
    priceIncludesTax, dateToCheck, roundingMethod)
public static decimal GetActivePrice(
    IPricingDataManager pricingDataManager,
    DiscountParameters priceParameters,
    string currencyCode,
    SalesLine saleItem,
    decimal quantity,
    string customerId,
    string customerPriceGroup,
    bool priceIncludesTax,
    DateTime dateToCheck,
    RoundingRule roundingMethod
)
public:
static Decimal GetActivePrice(
    IPricingDataManager^ pricingDataManager, 
    DiscountParameters^ priceParameters, 
    String^ currencyCode, 
    SalesLine^ saleItem, 
    Decimal quantity, 
    String^ customerId, 
    String^ customerPriceGroup, 
    bool priceIncludesTax, 
    DateTime dateToCheck, 
    RoundingRule^ roundingMethod
)

Parameters

Return Value

Type: System.Decimal
The price for the sales line based on the date/unit/quantity/customer/channel/etc.

Remarks

The lowest price from the following becomes the Active price: Item Card Trade Agreements Promotion Key in new Price

Find the Customer Price: If the Active price is lower then Customer price => Use Active price. If the Customer price is lower then Active price => Use Customer Price.

See Also

Reference

PricingEngine Class

Microsoft.Dynamics.Commerce.Runtime.Services.PricingEngine Namespace