Amount Class |
Namespace: Aloe.EnterpriseOne.Model
The Amount type exposes the following members.
Name | Description | |
---|---|---|
![]() | Currency |
Gets the currency of the amount.
|
![]() | Value |
Gets the value of the amount.
|
![]() ![]() | Zero |
Gets the zero amount, with no currency.
|
Name | Description | |
---|---|---|
![]() ![]() | Add |
Returns the sum of the specified amounts. The amounts must have the same currency.
|
![]() ![]() | AreCompatible |
Returns true if the two amounts are compatible (e.g. have the same currency).
|
![]() ![]() | Compare |
Compares the amounts. The amounts must have the same currency.
|
![]() | CompareTo(Object) |
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
|
![]() | CompareTo(Amount) |
Compares the current object with another object of the same type.
|
![]() ![]() | Divide(Amount, Amount) |
Divides the dividend by the divisor.
|
![]() ![]() | Divide(Amount, Decimal) |
Divides the specified amount.
|
![]() | Equals(Object) |
Determines whether the specified Object, is equal to this instance.
(Overrides ObjectEquals(Object).) |
![]() | Equals(Amount) |
Indicates whether the current object is equal to another object of the same type.
|
![]() | GetHashCode |
Returns a hash code for this instance.
(Overrides ObjectGetHashCode.) |
![]() ![]() | Multiply |
Multiplies the amount with the specified multiplier.
|
![]() | Round |
Returns new Amount, which is rounded, according to the rules of the currency.
|
![]() ![]() | Subtract |
Subtracts the second amount from the first. The amounts must have the same currency.
|
![]() | ToString |
Returns a String that represents this instance.
(Overrides ObjectToString.) |
Name | Description | |
---|---|---|
![]() ![]() | Addition |
Returns the sum of the specified amounts. The amounts must have the same currency.
|
![]() ![]() | Division(Amount, Amount) |
Implements the operator /.
|
![]() ![]() | Division(Amount, Decimal) |
Implements the operator /.
|
![]() ![]() | Equality |
Implements the operator ==.
|
![]() ![]() | GreaterThan |
Compares first and second.
|
![]() ![]() | GreaterThanOrEqual |
Implements the operator >=.
|
![]() ![]() | Inequality |
Implements the operator !=.
|
![]() ![]() | LessThan |
Implements the operator <.
|
![]() ![]() | LessThanOrEqual |
Implements the operator <=.
|
![]() ![]() | Multiply(Decimal, Amount) |
Implements the operator *.
|
![]() ![]() | Multiply(Amount, Decimal) |
Implements the operator *.
|
![]() ![]() | Subtraction |
Subtracts the second amount from the first. The amounts must have the same currency.
|
Amount supports basic amount arithmetic, which is currency-safe. For example, adding two amounts is currency-safe, because the two amounts are added successfully only if their currencies are the same (or one of the amounts is zero). This helps avoid errors of inadvertently doing amount arithmetic with incompatible currencies.
The following basic rules are true for Amount: