PdsComdPricingMarginLine.computeMargin Method
Computes the margin for the line based on the current cost and specified template line.
Syntax
public PdsComdMargin computeMargin(PdsComdPricingTemplateLine _templateLine, [CurrencyCode _currencyCode])
Run On
Called
Parameters
- _templateLine
Type: PdsComdPricingTemplateLine Table
The template line with the margin calculation variables with which to compute the margin.
- _currencyCode
Type: CurrencyCode Extended Data Type
The currency code to use for rounding; optional.
Return Value
Type: PdsComdMargin Extended Data Type
The margin value that is used for this line.
Remarks
This computes the margin from using the current cost value and the margin variables in the specified template line. The result will be rounded using the specified currency or company default currency if no currency code is given.The cost field on this margin line must be valid.