Manipulates Currency amount information. The Currency type is returned when the property is of type 'Currency'

Properties

amount

Returns the amount value
Sets the amount

return: the number (double) value

currency

Get the ISO currency symbol for that currency amount
Sets the currency. Note that this does NOT trigger a currency conversion.

return: The currency (ex EUR)

date

Get the reference date (for currency conversions)
Set the reference date

ref1

Get the ref1 (converted value as reference currency 1 - by default EUR)
sets the ref1

ref2

Get the ref2
set the ref2

Functions

Add(param)

Adds an amount to this amount

return: The total of the two amounts
example:
var total = amount1.Add(amount2);

Substract(param)

Substract an amount to this amount

return: The result of the substraction
example:
var diff = amount1.Substract(amount2);

Multiply(param)

Multiply an amount by a number

  • param a number (double)

return: The result
example:
var result = amount1.Multiply(taxrate);

Tags:
Created by Pierre Dubois on 2018/06/06 17:09
     
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 9.11.5 - Documentation