CurrencyExchangeHelper.calculateTransactionToReporting Method [AX 2012]
Calculates the reporting currency amount from the specified transaction currency amount.
Syntax
public AmountMSTSecondary calculateTransactionToReporting(CurrencyCode _transactionCurrency, AmountCur _transactionCurrencyAmount)
Run On
Called
Parameters
- _transactionCurrency
Type: CurrencyCode Extended Data Type
- _transactionCurrencyAmount
Type: AmountCur Extended Data Type
The transaction currency amount to use to calculate the reporting currency amount.
Return Value
Type: AmountMSTSecondary Extended Data Type
The rounded amount if the transaction currency equals the reporting currency; otherwise a reporting currency amount that has been calculated from the transaction currency amount with the appropriate rounding applied.
Remarks
This method uses the parmLedger, parmFromCurrency, parmExchangeDate, parmExchangeRate1, parmExchangeRate2, and parmIsTriangulated properties.
The parmExchangeRate1 and parmExchangeRate2 properties can be set to ordinary values because this calculation will invert the rates appropriately to perform the calculation.
If the transaction currency and the secondary currency are identical, the provided amount will be rounded and returned.