AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de gestión del euro
  • Exchange table
  • Rounding difference
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Converts to Euro a value expressed in a specific currency.
WEBDEV - Código Navegador Important: The eToEuro function can be used in browser code to perform approximate calculations without refreshing the page on the server (saves time during Internet communications).. The precision of the calculations performed in browser code does not correspond to the Euro standard. To perform precise calculations, we advise you to send the page back to the server and to perform the calculations in a server code.
Ejemplo
// Convert Marks to Euro
ResConversion = eToEuro(150, eDEM)
WEBDEV - Código ServidorPHPAjax
// Convert Liras to Euro and manage the rounding difference
// Two decimal places are used for the conversion
ResConversion = eToEuro(10000, eITL, 2, resDiff)
Sintaxis
<Result> = eToEuro(<Value to convert> [, <Source currency> [, <Number of decimals> [, <Rounding difference>]]])
<Result>: Currency
Value converted into Euros.
<Value to convert>: Currency
Amount to convert.
<Source currency>: Integer or constant (optional)
Identifier of the source currency or constant associated with the source currency. If this parameter is not specified, the currency to convert is the currency whose identifier is "1" (by default the French Franc).
<Number of decimals>: Optional integer
Number of decimal places used for the result of the conversion (2 by default).
<Rounding difference>: Optional currency
Variable retrieving the rounding difference caused by the conversion. This difference is expressed in the source currency.
This parameter is only useful for currencies whose exchange rate is greater than the Euro (Belgium Franc, Peseta, etc.). For the other currencies, this parameter is always null.
Observaciones

Exchange table

An exchange table is stored in memory. Each currency is associated with:
  • A currency number used to identify the currency programmatically.
  • A constant used to identify the currency programmatically.
  • A label (7 characters maximum): this label is displayed in the "Currency + Euro" field if the edit control allows it (the $ sign is indicated).
  • An exchange rate. This exchange rate corresponds to the exchange rate of the currency in relation to the Euro.
This exchange table is as follows:
Currency numberConstantCountryExchange rateDefault caption
0eEUREuro zone1EURO
1eFRFFrance6.55957F
2eITLItaly1936.27ITL
3eBEFBelgium40.3399BEF
4eLUFLuxembourg40.3399LUF
5eDEMGermany1.95583DEM
6eATSAustria13.7603ATS
8eESPSpain166.386ESP
9eIEPIreland0.787564IEP
10eNLGNetherlands2.20371NLG
11ePTEPortugal200.482PTE
14eGRDGreece340.750GRD
15eFIMFinland5.94573FIM
Currencies not taking part in the Euro
7eDKKDenmark0DKK
12eGBPGreat Britain0GBP
13eSEKSweden0SEK
16 - 25 0Free1 to Free10
26eCYPCyprus0CYP
27eCZKCzech Republic0CZK
28eEEKEstonia0EEK
29eHUFHungary0HUF
30eLTLLithuania0LTL
31eLVLLatvia0LVL
32eMTLMalta0MTL
33ePLNPoland0SCH
34eSITSlovenia0SIT
35eSKKSlovakia0SKK
The first currency (whose identifier is set to 0) is the currency used as reference for the conversions.
In this exchange table, you have the ability to:
  • add new currencies by modifying the custom currencies if necessary ("user-defined currencies" from 16 to 25) with eInitCurrency,
  • specify the exchange rate of each currency with eInitCurrency.
Warning Currencies with an exchange rate of zero will not appear in the context menu of the "Monetary + Euro" field. To define the exchange rate of these currencies, you must redefine them in the initialization code of the project with eInitCurrency.
WEBDEV - Código ServidorPHPAjax

Rounding difference

The <Rounding difference> is calculated by the following formula:
Round(<Value to convert>, <Result in source currency>, <Number of decimals>)
For example:
Difference AND ResConversion are currencies
ResConversion = eToEuro(1.52, eFRF, 2, Difference)
ResConversion is set to 0.45 and Difference is set to 0.01.
The following line of code allows you to retrieve the initial amount:
InitialAmount = eToCurrency(ResConversion, eFRF, 2) + Difference
Componente: wd300std.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local