Implementing a Currency Conversion

You can implement a custom currency conversion.

  1. Define which currencies users can convert to, for example, you could choose to let users convert to Yen, Euros, and Dollars. In Business Modeler or MQL, add and remove range values for the Currency attribute so it includes all currencies that you want to convert. Use the standard abbreviations for each currency.

    These Business Modeler dialog boxes show where currency ranges are defined.



  2. Using the People and Organizations tool, define currency conversions for each company using the Currency Exchange Rates category in the company's category list. For instructions, seeCurrency Exchange Rates Page.

  3. In a configurable table, identify the currency columns that users should be able to convert by adding the format=currency setting for the column.

  4. To display the table with the converted currency data in the new window, the table component uses the ConvertCurrencyTag TagLib. The TagLib uses these parameters to configure the displayed converted data.

    TagLib Parameter Column Setting Description

    from

    Currency Expression

    The name of the currency to convert from.

    Setting "Currency Expression" is assigned to a select clause, which provides the value for the Currency attribute for a specific object or relationship. This should be the currency the user entered the data in (the As Entered currency).

    For example, to convert data for an RFQ Quotation, the following select clause returns the currency format.

    to[Supplier Line Item].attribute[Currency]

    to

     

    The name of the currency to convert to.

    The value for this "to" parameter is obtained from the session and is the preferred currency selected by the user.

    If not defined, no conversion is applied.

    value

     

    Actual value to be displayed in the column (currency).

    date

    Effective Date Expression

    The "Effective Date Expression" is assigned to a select clause, which provides the value for the Effectivity Date attribute on a specific object or relationship. The system uses this date to get the currency conversion whose rate period falls within this date.

    For example, for data for an RFQ Quotation, the following select clause returns the effective date.

    to[Supplier Line 
    Item].attribute[Effectivity Date]

    decimalSeparator

     

    Decimal separator symbol for displaying the currency value. This symbol is defined in emxSystem.properties using the key:

    emxFramework.DecimalSymbol = .

    digitSeparatorPreference

     

    Determines whether to display a thousandths separator for currency and quantity fields (for example, 1,000). This symbol is defined in emxSystem.properties using the key:

    emxFramework.DigitSeparator = false

    For example:

    <framework:convertCurrency
                  from="Dollar"
                  to="Yen"
                  value="50000"
                  date="25/05/2001"
                  decimalSeparator="."
                  digitSeparatorPreference="true"