AmountOffFromDiscountLine Method

Returns the unrounded amount of money subtracted by the discount line.

Assumes the discount line only has one of Amount or Percent which are non-zero.

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

public static decimal AmountOffFromDiscountLine(
	this SalesLine salesLine,
	DiscountLine discountLine

Return Value

Type: System.Decimal
Unrounded amount off due to discount line.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type SalesLine. When you use instance method syntax to call this method, omit the first parameter. For more information, see b8020aae-374d-46a9-bcb7-8cc2390b93b6 or 175ce3ff-9bbf-4e64-8421-faeb81a0bb51.

This does not work perfectly with compounded retail periodic percent discounts. They will differ depending on the order of application as each successive percent applied has less to subtract from.