If you want to make the application multicurrency-enabled, you can define the currency list you want to support under the properties of the knowledge base.
Note that currency features, when assigned a value, apply this value to the current currency ID set with the Server.DialogCurrency property.
So far, we have assigned a price to each material by assigning a number. This works well if the materials are allocated in the main currency, but what happens if the currency has been changed from EUR to USD beforehand and then a material is created? Then a value that was originally intended as a EUR value is used as the USD value.
Therefore, values assigned to a currency feature must be clearly marked as the main currency value. This is best done by:
a) Using a currency constant.
b) Assigning a numeric value with the attribute CurrencyValue of a currency variable.
Price.CurrencyValue("EUR") := 100.87
Therefore, a change must be made for all material prices:
Define a currency constant [List price] in the class Material:
Initialize the feature price with this constant:
Now go into each material number and override the constant C and enter the main currency price. Check the Price feature to see if only the constant [List price] is actually initialized.
Now turn on the Use currency factors switch at the Price feature of the Material class. With this setting, currency features use the conversion expression defined here. The determination of the currency factor is set automatically by using the currency factors of the knowledge base.
Now expand the menu of our main window in class Start.
Set the menu items (example).
Respond to the Click event.