Relate Currency
Overview
The IFC schema contains the ability to capture relationships between different currencies to support the ability of an application to change reliably from one currency representation to another. This is achieved using a currency relationship.
A currency relationship defines the relationship between two currencies. Each currency is captured as a monetary unit for the country or region in which it is applicable. The relating currency is that which is to be converted and the related currency is the result of the conversion.
Each relationship has an exchange rate that defines the ratio of one unit of the relating currency to an amount in the related currency.
Because exchange rates can vary, a date and time that specifies the point in time at which the exchange rate applies is captured. Because this includes time, it allows for multiple exchange rates to occur in one day.
In many cases, there may also be the need to identify the source from which the exchange rate value was derived (since quoted rates may vary between sources). For this purpose, a source can be captured. The source is identified by a name and a location. In many cases, the location will be a URL for a financial web site.
Note that whilst the IFC schema captures a currency relationship, it does not have any methods or functions that enable the transformation between one currency and another. It is the responsibility of software applications or externally defined rules to perform such a transformation.
Results
The exchange rate relationship between two currencies is captured.
| Description | Entity/Pset/Functional Part | MAN | REC | OPT |
|---|---|---|---|---|
| Determine the currency from which the exchange is to be made.
A list of currencies is provided in terms of their three character code identifiers |
IfcMonetaryUnit.Currency::IfcCurrencyEnum | |||
| Set the currency from which the exchange is to be made as the relating currency | IfcCurrencyRelationship.RelatingCurrency::IfcMonetaryUnit | |||
| Determine the currency to which the exchange is to be made.
A list of currencies is provided in terms of their three character code identifiers |
IfcMonetaryUnit.Currency::IfcCurrencyEnum | |||
| Set the currency to which the exchange is to be made as the related currency | IfcCurrencyRelationship.RelatingCurrency::IfcMonetaryUnit | |||
| Set the value of the exchange rate
An exchange rate value may be prescribed directly by the user or it may be obtained from a source as below. |
IfcCurrencyRelationship.ExchangeRate::IfcPositiveRatioMeasure | |||
| Set the date and time at which this exchange rate is valid
The date and time may be fixed as the time at which the exchange is made or it may be the date and time from which the exchange rate is valid. In the latter case, the date and time values should be obtained from a reliable source. |
IfcCurrencyRelationship.RateDateTime::fp_select_date_time | |||
| It is recommended that currency relationships should be derived from a reliable source. Typically, this will be a major bank, government institution or the financial press. | ||||
|
IfcLibraryInformation.Name::IfcLabel | |||
|
IfcLibraryInformation.Publisher::fp_set_organization | |||
|
IfcLibraryInformation.Versio::IfcLabel | |||
| Specify the date on which the version of the source became valid | ||||
|
IfcCalendarDate.DayComponent::IfcDayInMonthNumber | |||
|
IfcCalendarDate.MonthComponent::IfcMonthInYearNumber | |||
|
IfcCalendarDate.YearComponent::IfcYearNumber | |||
|
IfcLibraryInformation.VersionDate::IfcCalendarDate | |||
| Identify the location of the source from which rate information is obtained | ||||
|
IfcLibraryReference.Location::IfcLabel | |||
|
IfcLibraryReference.Name::IfcLabel | |||
|
IfcLibraryReference.ItemReference::IfcIdentifier | |||
|
IfcLibraryInformation.RateSource::IfcLibraryReference |
IFC Entities Required
- IfcCalendarDate
- IfcCurrencyRelationship
- IfcExternalReference
- IfcLibraryInformation
- IfcLibraryReference
- IfcMonetaryUnit
IFC Datatypes Required
- IfcCurrencyEnum
- IfcDayInMonthNumber
- IfcIdentifier
- IfcLabel
- IfcMonthInYearNumber
- IfcYearNumber
- IfcPositiveRatioMeasure
- IfcRatioMeasure
IFC Functions Required
- IfcValidCalendarDate
IFC Property Sets Required
- -
IDM Functional Parts Required
- fp_set_organization
- fp_select_date_time
EXPRESS Schema
SCHEMA FP_RELATE_CURRENCY;
TYPE IfcDayInMonthNumber = INTEGER;
END_TYPE;
TYPE IfcIdentifier = STRING;
END_TYPE;
TYPE IfcLabel = STRING;
END_TYPE;
TYPE IfcMonthInYearNumber = INTEGER;
WHERE
WR1 : { 1<= SELF <= 12 };
END_TYPE;
TYPE IfcRatioMeasure = REAL;
END_TYPE;
TYPE IfcPositiveRatioMeasure = IfcRatioMeasure;
WHERE
WR1 : SELF > 0;
END_TYPE;
TYPE IfcYearNumber = INTEGER;
END_TYPE;
TYPE IfcCurrencyEnum = ENUMERATION OF
(AED,
AES,
ATS,
AUD,
BBD,
BEG,
BGL,
BHD,
BMD,
BND,
BRL,
BSD,
BWP,
BZD,
CAD,
CBD,
CHF,
CLP,
CNY,
CYS,
CZK,
DDP,
DEM,
DKK,
EGL,
EST,
EUR,
FAK,
FIM,
FJD,
FKP,
FRF,
GBP,
GIP,
GMD,
GRX,
HKD,
HUF,
ICK,
IDR,
ILS,
INR,
IRP,
ITL,
JMD,
JOD,
JPY,
KES,
KRW,
KWD,
KYD,
LKR,
LUF,
MTL,
MUR,
MXN,
MYR,
NLG,
NZD,
OMR,
PGK,
PHP,
PKR,
PLN,
PTN,
QAR,
RUR,
SAR,
SCR,
SEK,
SGD,
SKP,
THB,
TRL,
TTD,
TWD,
USD,
VEB,
VND,
XEU,
ZAR,
ZWD,
NOK);
END_TYPE;
ENTITY IfcMonetaryUnit;
Currency : IfcCurrencyEnum;
END_ENTITY;
ENTITY IfcExternalReference
ABSTRACT SUPERTYPE;
Location : OPTIONAL IfcLabel;
ItemReference : OPTIONAL IfcIdentifier;
Name : OPTIONAL IfcLabel;
WHERE
WR1 : EXISTS(ItemReference) OR EXISTS(Location) OR EXISTS(Name);
END_ENTITY;
ENTITY IfcCalendarDate;
DayComponent : IfcDayInMonthNumber;
MonthComponent : IfcMonthInYearNumber;
YearComponent : IfcYearNumber;
WHERE
WR21 : IfcValidCalendarDate (SELF);
END_ENTITY;
ENTITY IfcLibraryReference
SUBTYPE OF(IfcExternalReference);
INVERSE
ReferenceIntoLibrary : SET [0:1] OF IfcLibraryInformation FOR LibraryReference;
END_ENTITY;
ENTITY IfcLibraryInformation;
Name : IfcLabel;
Version : OPTIONAL IfcLabel;
Publisher : OPTIONAL fp_organization;
VersionDate : OPTIONAL IfcCalendarDate;
LibraryReference : OPTIONAL SET [1:?] OF IfcLibraryReference;
END_ENTITY;
ENTITY IfcCurrencyRelationship;
RelatingMonetaryUnit : IfcMonetaryUnit;
RelatedMonetaryUnit : IfcMonetaryUnit;
ExchangeRate : IfcPositiveRatioMeasure;
RateDateTime : fp_select_date_time;
RateSource : OPTIONAL IfcLibraryInformation;
END_ENTITY;
ENTITY fp_set_organization;
END_ENTITY;
ENTITY fp_select_date_time;
END_ENTITY;
FUNCTION IfcValidCalendarDate
(Date : IfcCalendarDate)
: LOGICAL;
IF NOT ({1 <= Date.DayComponent <= 31}) THEN
RETURN(FALSE);
END_IF;
CASE Date.MonthComponent OF
4 : RETURN({ 1<= Date.DayComponent <= 30});
6 : RETURN({ 1<= Date.DayComponent <= 30});
9 : RETURN({ 1<= Date.DayComponent <= 30});
11 : RETURN({ 1<= Date.DayComponent <= 30});
2 :
BEGIN
IF (IfcLeapYear(Date.YearComponent)) THEN
RETURN({ 1<= Date.DayComponent <= 29});
ELSE
RETURN({ 1<= Date.DayComponent <= 28});
END_IF;
END;
OTHERWISE : RETURN(TRUE);
END_CASE;
END_FUNCTION;
END_SCHEMA;
Examples of Currency Relationship
In this example, a currency exchange relationship is defined between the Euro (EUR) and the British Pound (GBP)for the purpose of establishing the value added tax impact of goods purchased from the UK for use on a site within the European 'Eurozone'. For this purpose, HM Revenue and Customs publish allowed exchange rates for calculation on their web site at:
'http://customs.hmrc.gov.uk/channelsPortalWebApp/channelsPortalWebApp.portal?_nfpb=true&_pageLabel=pageVAT_RatesCodesTools&columns=1&id=ERATES_2005'
For the purposes of the example, this location will be shortened to 'http://customs.hmrc.gov.uk'
Rates are published weekly within a month and overall within a month. In this example, the rates defined in the list identified as 'Rates of Exchange for Customs and VAT Purposes 06-2005' will be used but this will be named as 'HM Revenue and Customs'. For this, a version of '06-2005' will be applied which is considered to have a version date of 1st June 2005 and, since this is a fixed list of rates, this date will also be the date and time for the exchange.
Within this list, the exchange rate is shown as ?1.4515 = £1
/* instance of the Currencies concerned */
#2001=IFCMONETARYUNIT(.GBP.);
#2002=IFCMONETARYUNIT(.EUR.);
/* instance of the IfcCostValue */
#3000=IFCCURRENCYRELATIONSHIP(#2001,#2002,1.4515,#4010,#5000);
/* the date and time at which the exchange is current */
#4000=IFCCALENDARDATE(1,6,2005);
#4010=IFCDATEANDTIME(#4000,#4020);
#4020=IFCLOCALTIME(0,0,0,$,$);
/* instance of the IfcLibraryInformation*/
#5000=IFCLIBRARYINFORMATION=('HM Revenue and Customs','06-2005',$,#4000,#5100);
#5100=IFCLIBRARYREFERENCE=('http://customs.hmrc.gov.uk',$,$);