Previous Topic

Book Contents

Book Index

Next Topic

Example: Currency Conversion

In the object type Product Class (untranslated name 'Itemtypeclass'), Currency Conversion is used for price calculation. The original price is converted from currency to currency2 and the result is stored in the Price (B) field.

The Calculation Browser reveals the following information:

  • Calculation Name

    Itemtypeclass.price2 ....

  • Object Type

... is used in the Product Class object type.

  • Attribute For Result

    The result of the calculation goes to the Price (B) attribute.

  • Calculation Formula

    The calculation formula uses the currencyConversion built-in function.

Help Image
Calculation for Currency conversion in the Calculation Browser.

Double-clicking anywhere in the line or using the 'Edit' button in the Calculation browser calls the Calculation Customizer where the calculation can be edited.

Help Image
Calculation Customizer: Editing the currency calculation.

Calculation Formula

The calculation formula uses the 'currencyConversion' built-in function. This function returns the currency conversion rate for a conversion on a date. The function has two parameters (currency,currency2) separated by a comma.

To get the resulting price, the original price is multiplied by this conversion rate.

The syntactical structure is as follows:

price * function (parameter1, parameter2)

Here:

price* currencyConversion(currency,currency2)

See Also

Examples

Example: Total Net Price

Example: Calculation for the Treeview Mode