CalculateDiscountsForLines Method

Calculates all of the discount lines for the transactions.

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

public static void CalculateDiscountsForLines(
	IPricingDataManager pricingDataManager,
	SalesTransaction transaction,
	RoundingRule roundingRule,
	string currencyCode,
	bool doesPriceIncludeTax,
	string lineDiscountGroup,
	string multilineDiscountGroup,
	string totalDiscountGroup
)

Parameters

pricingDataManager
Type: Microsoft.Dynamics.Commerce.Runtime.Data.IPricingDataManager
transaction
Type: Microsoft.Dynamics.Commerce.Runtime.DataModel.SalesTransaction
roundingRule
Type: Microsoft.Dynamics.Commerce.Runtime.Data.RoundingRule
currencyCode
Type: System.String
doesPriceIncludeTax
Type: System.Boolean
lineDiscountGroup
Type: System.String
multilineDiscountGroup
Type: System.String
totalDiscountGroup
Type: System.String

Each sales line will have a collection of DiscountLines and a net discount total in DiscountAmount property.

Community Additions

Show: