Added numericCode to Currency
This commit is contained in:
parent
92785af8f5
commit
33c0dc9d01
|
@ -1,184 +1,184 @@
|
|||
package net.codinux.invoicing.model.codes
|
||||
|
||||
enum class Currency(val alpha3Code: String, val currencySymbol: String?, val englishName: String, val countries: Set<String>, val isFrequentlyUsedValue: Boolean) {
|
||||
UAEDirham("AED", "AED", "UAE Dirham", setOf("UNITED ARAB EMIRATES (THE)"), false),
|
||||
Afghani("AFN", "AFN", "Afghani", setOf("AFGHANISTAN"), false),
|
||||
Lek("ALL", "ALL", "Lek", setOf("ALBANIA"), false),
|
||||
ArmenianDram("AMD", "AMD", "Armenian Dram", setOf("ARMENIA"), false),
|
||||
NetherlandsAntilleanGuilder("ANG", "ANG", "Netherlands Antillean Guilder", setOf("CURAÇAO", "SINT MAARTEN (DUTCH PART)"), false),
|
||||
Kwanza("AOA", "AOA", "Kwanza", setOf("ANGOLA"), false),
|
||||
ArgentinePeso("ARS", "ARS", "Argentine Peso", setOf("ARGENTINA"), false),
|
||||
AustralianDollar("AUD", "A$", "Australian Dollar", setOf("AUSTRALIA", "CHRISTMAS ISLAND", "COCOS (KEELING) ISLANDS (THE)", "HEARD ISLAND AND McDONALD ISLANDS", "KIRIBATI", "NAURU", "NORFOLK ISLAND", "TUVALU"), false),
|
||||
ArubanFlorin("AWG", "AWG", "Aruban Florin", setOf("ARUBA"), false),
|
||||
AzerbaijanManat("AZN", "AZN", "Azerbaijan Manat", setOf("AZERBAIJAN"), false),
|
||||
ConvertibleMark("BAM", "BAM", "Convertible Mark", setOf("BOSNIA AND HERZEGOVINA"), false),
|
||||
BarbadosDollar("BBD", "BBD", "Barbados Dollar", setOf("BARBADOS"), false),
|
||||
Taka("BDT", "BDT", "Taka", setOf("BANGLADESH"), false),
|
||||
BulgarianLev("BGN", "BGN", "Bulgarian Lev", setOf("BULGARIA"), false),
|
||||
BahrainiDinar("BHD", "BHD", "Bahraini Dinar", setOf("BAHRAIN"), false),
|
||||
BurundiFranc("BIF", "BIF", "Burundi Franc", setOf("BURUNDI"), false),
|
||||
BermudianDollar("BMD", "BMD", "Bermudian Dollar", setOf("BERMUDA"), false),
|
||||
BruneiDollar("BND", "BND", "Brunei Dollar", setOf("BRUNEI DARUSSALAM"), false),
|
||||
Boliviano("BOB", "BOB", "Boliviano", setOf("BOLIVIA (PLURINATIONAL STATE OF)"), false),
|
||||
Mvdol("BOV", "BOV", "Mvdol", setOf("BOLIVIA (PLURINATIONAL STATE OF)"), false),
|
||||
BrazilianReal("BRL", "R$", "Brazilian Real", setOf("BRAZIL"), false),
|
||||
BahamianDollar("BSD", "BSD", "Bahamian Dollar", setOf("BAHAMAS (THE)"), false),
|
||||
Ngultrum("BTN", "BTN", "Ngultrum", setOf("BHUTAN"), false),
|
||||
Pula("BWP", "BWP", "Pula", setOf("BOTSWANA"), false),
|
||||
BelarusianRuble("BYN", "BYN", "Belarusian Ruble", setOf("BELARUS"), false),
|
||||
BelizeDollar("BZD", "BZD", "Belize Dollar", setOf("BELIZE"), false),
|
||||
CanadianDollar("CAD", "CA$", "Canadian Dollar", setOf("CANADA"), false),
|
||||
CongoleseFranc("CDF", "CDF", "Congolese Franc", setOf("CONGO (THE DEMOCRATIC REPUBLIC OF THE)"), false),
|
||||
WIREuro("CHE", "CHE", "WIR Euro", setOf("SWITZERLAND"), false),
|
||||
SwissFranc("CHF", "CHF", "Swiss Franc", setOf("LIECHTENSTEIN", "SWITZERLAND"), true),
|
||||
WIRFranc("CHW", "CHW", "WIR Franc", setOf("SWITZERLAND"), false),
|
||||
UnidadDeFomento("CLF", "CLF", "Unidad de Fomento", setOf("CHILE"), false),
|
||||
ChileanPeso("CLP", "CLP", "Chilean Peso", setOf("CHILE"), false),
|
||||
YuanRenminbi("CNY", "CN¥", "Yuan Renminbi", setOf("CHINA"), false),
|
||||
ColombianPeso("COP", "COP", "Colombian Peso", setOf("COLOMBIA"), false),
|
||||
UnidadDeValorReal("COU", "COU", "Unidad de Valor Real", setOf("COLOMBIA"), false),
|
||||
CostaRicanColon("CRC", "CRC", "Costa Rican Colon", setOf("COSTA RICA"), false),
|
||||
PesoConvertible("CUC", "CUC", "Peso Convertible", setOf("CUBA"), false),
|
||||
CubanPeso("CUP", "CUP", "Cuban Peso", setOf("CUBA"), false),
|
||||
CaboVerdeEscudo("CVE", "CVE", "Cabo Verde Escudo", setOf("CABO VERDE"), false),
|
||||
CzechKoruna("CZK", "CZK", "Czech Koruna", setOf("CZECHIA"), true),
|
||||
DjiboutiFranc("DJF", "DJF", "Djibouti Franc", setOf("DJIBOUTI"), false),
|
||||
DanishKrone("DKK", "DKK", "Danish Krone", setOf("DENMARK", "FAROE ISLANDS (THE)", "GREENLAND"), true),
|
||||
DominicanPeso("DOP", "DOP", "Dominican Peso", setOf("DOMINICAN REPUBLIC (THE)"), false),
|
||||
AlgerianDinar("DZD", "DZD", "Algerian Dinar", setOf("ALGERIA"), false),
|
||||
EgyptianPound("EGP", "EGP", "Egyptian Pound", setOf("EGYPT"), false),
|
||||
Nakfa("ERN", "ERN", "Nakfa", setOf("ERITREA"), false),
|
||||
EthiopianBirr("ETB", "ETB", "Ethiopian Birr", setOf("ETHIOPIA"), false),
|
||||
Euro("EUR", "€", "Euro", setOf("ÅLAND ISLANDS", "ANDORRA", "AUSTRIA", "BELGIUM", "CYPRUS", "ESTONIA", "EUROPEAN UNION", "FINLAND", "FRANCE", "FRENCH GUIANA", "FRENCH SOUTHERN TERRITORIES (THE)", "GERMANY", "GREECE", "GUADELOUPE", "HOLY SEE (THE)", "IRELAND", "ITALY", "LATVIA", "LITHUANIA", "LUXEMBOURG", "MALTA", "MARTINIQUE", "MAYOTTE", "MONACO", "MONTENEGRO", "NETHERLANDS (THE)", "PORTUGAL", "RÉUNION", "SAINT BARTHÉLEMY", "SAINT MARTIN (FRENCH PART)", "SAINT PIERRE AND MIQUELON", "SAN MARINO", "SLOVAKIA", "SLOVENIA", "SPAIN"), true),
|
||||
FijiDollar("FJD", "FJD", "Fiji Dollar", setOf("FIJI"), false),
|
||||
FalklandIslandsPound("FKP", "FKP", "Falkland Islands Pound", setOf("FALKLAND ISLANDS (THE) [MALVINAS]"), false),
|
||||
PoundSterling("GBP", "£", "Pound Sterling", setOf("GUERNSEY", "ISLE OF MAN", "JERSEY", "UNITED KINGDOM OF GREAT BRITAIN AND NORTHERN IRELAND (THE)"), true),
|
||||
Lari("GEL", "GEL", "Lari", setOf("GEORGIA"), false),
|
||||
GhanaCedi("GHS", "GHS", "Ghana Cedi", setOf("GHANA"), false),
|
||||
GibraltarPound("GIP", "GIP", "Gibraltar Pound", setOf("GIBRALTAR"), false),
|
||||
Dalasi("GMD", "GMD", "Dalasi", setOf("GAMBIA (THE)"), false),
|
||||
GuineanFranc("GNF", "GNF", "Guinean Franc", setOf("GUINEA"), false),
|
||||
Quetzal("GTQ", "GTQ", "Quetzal", setOf("GUATEMALA"), false),
|
||||
GuyanaDollar("GYD", "GYD", "Guyana Dollar", setOf("GUYANA"), false),
|
||||
HongKongDollar("HKD", "HK$", "Hong Kong Dollar", setOf("HONG KONG"), false),
|
||||
Lempira("HNL", "HNL", "Lempira", setOf("HONDURAS"), false),
|
||||
Gourde("HTG", "HTG", "Gourde", setOf("HAITI"), false),
|
||||
Forint("HUF", "HUF", "Forint", setOf("HUNGARY"), false),
|
||||
Rupiah("IDR", "IDR", "Rupiah", setOf("INDONESIA"), false),
|
||||
NewIsraeliSheqel("ILS", "₪", "New Israeli Sheqel", setOf("ISRAEL"), false),
|
||||
IndianRupee("INR", "₹", "Indian Rupee", setOf("BHUTAN", "INDIA"), false),
|
||||
IraqiDinar("IQD", "IQD", "Iraqi Dinar", setOf("IRAQ"), false),
|
||||
IranianRial("IRR", "IRR", "Iranian Rial", setOf("IRAN (ISLAMIC REPUBLIC OF)"), false),
|
||||
IcelandKrona("ISK", "ISK", "Iceland Krona", setOf("ICELAND"), true),
|
||||
JamaicanDollar("JMD", "JMD", "Jamaican Dollar", setOf("JAMAICA"), false),
|
||||
JordanianDinar("JOD", "JOD", "Jordanian Dinar", setOf("JORDAN"), false),
|
||||
Yen("JPY", "¥", "Yen", setOf("JAPAN"), false),
|
||||
KenyanShilling("KES", "KES", "Kenyan Shilling", setOf("KENYA"), false),
|
||||
Som("KGS", "KGS", "Som", setOf("KYRGYZSTAN"), false),
|
||||
Riel("KHR", "KHR", "Riel", setOf("CAMBODIA"), false),
|
||||
ComorianFranc("KMF", "KMF", "Comorian Franc", setOf("COMOROS (THE)"), false),
|
||||
NorthKoreanWon("KPW", "KPW", "North Korean Won", setOf("KOREA (THE DEMOCRATIC PEOPLE’S REPUBLIC OF)"), false),
|
||||
Won("KRW", "₩", "Won", setOf("KOREA (THE REPUBLIC OF)"), false),
|
||||
KuwaitiDinar("KWD", "KWD", "Kuwaiti Dinar", setOf("KUWAIT"), false),
|
||||
CaymanIslandsDollar("KYD", "KYD", "Cayman Islands Dollar", setOf("CAYMAN ISLANDS (THE)"), false),
|
||||
Tenge("KZT", "KZT", "Tenge", setOf("KAZAKHSTAN"), false),
|
||||
LaoKip("LAK", "LAK", "Lao Kip", setOf("LAO PEOPLE’S DEMOCRATIC REPUBLIC (THE)"), false),
|
||||
LebanesePound("LBP", "LBP", "Lebanese Pound", setOf("LEBANON"), false),
|
||||
SriLankaRupee("LKR", "LKR", "Sri Lanka Rupee", setOf("SRI LANKA"), false),
|
||||
LiberianDollar("LRD", "LRD", "Liberian Dollar", setOf("LIBERIA"), false),
|
||||
Loti("LSL", "LSL", "Loti", setOf("LESOTHO"), false),
|
||||
LibyanDinar("LYD", "LYD", "Libyan Dinar", setOf("LIBYA"), false),
|
||||
MoroccanDirham("MAD", "MAD", "Moroccan Dirham", setOf("MOROCCO", "WESTERN SAHARA"), false),
|
||||
MoldovanLeu("MDL", "MDL", "Moldovan Leu", setOf("MOLDOVA (THE REPUBLIC OF)"), false),
|
||||
MalagasyAriary("MGA", "MGA", "Malagasy Ariary", setOf("MADAGASCAR"), false),
|
||||
Denar("MKD", "MKD", "Denar", setOf("MACEDONIA (THE FORMER YUGOSLAV REPUBLIC OF)"), false),
|
||||
Kyat("MMK", "MMK", "Kyat", setOf("MYANMAR"), false),
|
||||
Tugrik("MNT", "MNT", "Tugrik", setOf("MONGOLIA"), false),
|
||||
Pataca("MOP", "MOP", "Pataca", setOf("MACAO"), false),
|
||||
Ouguiya("MRU", "MRU", "Ouguiya", setOf("MAURITANIA"), false),
|
||||
MauritiusRupee("MUR", "MUR", "Mauritius Rupee", setOf("MAURITIUS"), false),
|
||||
Rufiyaa("MVR", "MVR", "Rufiyaa", setOf("MALDIVES"), false),
|
||||
MalawiKwacha("MWK", "MWK", "Malawi Kwacha", setOf("MALAWI"), false),
|
||||
MexicanPeso("MXN", "MX$", "Mexican Peso", setOf("MEXICO"), false),
|
||||
MexicanUnidadDeInversionUDI("MXV", "MXV", "Mexican Unidad de Inversion (UDI)", setOf("MEXICO"), false),
|
||||
MalaysianRinggit("MYR", "MYR", "Malaysian Ringgit", setOf("MALAYSIA"), false),
|
||||
MozambiqueMetical("MZN", "MZN", "Mozambique Metical", setOf("MOZAMBIQUE"), false),
|
||||
NamibiaDollar("NAD", "NAD", "Namibia Dollar", setOf("NAMIBIA"), false),
|
||||
Naira("NGN", "NGN", "Naira", setOf("NIGERIA"), false),
|
||||
CordobaOro("NIO", "NIO", "Cordoba Oro", setOf("NICARAGUA"), false),
|
||||
NorwegianKrone("NOK", "NOK", "Norwegian Krone", setOf("BOUVET ISLAND", "NORWAY", "SVALBARD AND JAN MAYEN"), true),
|
||||
NepaleseRupee("NPR", "NPR", "Nepalese Rupee", setOf("NEPAL"), false),
|
||||
NewZealandDollar("NZD", "NZ$", "New Zealand Dollar", setOf("COOK ISLANDS (THE)", "NEW ZEALAND", "NIUE", "PITCAIRN", "TOKELAU"), false),
|
||||
RialOmani("OMR", "OMR", "Rial Omani", setOf("OMAN"), false),
|
||||
Balboa("PAB", "PAB", "Balboa", setOf("PANAMA"), false),
|
||||
Sol("PEN", "PEN", "Sol", setOf("PERU"), false),
|
||||
Kina("PGK", "PGK", "Kina", setOf("PAPUA NEW GUINEA"), false),
|
||||
PhilippinePeso("PHP", "₱", "Philippine Peso", setOf("PHILIPPINES (THE)"), false),
|
||||
PakistanRupee("PKR", "PKR", "Pakistan Rupee", setOf("PAKISTAN"), false),
|
||||
Zloty("PLN", "PLN", "Zloty", setOf("POLAND"), true),
|
||||
Guarani("PYG", "PYG", "Guarani", setOf("PARAGUAY"), false),
|
||||
QatariRial("QAR", "QAR", "Qatari Rial", setOf("QATAR"), false),
|
||||
RomanianLeu("RON", "RON", "Romanian Leu", setOf("ROMANIA"), false),
|
||||
SerbianDinar("RSD", "RSD", "Serbian Dinar", setOf("SERBIA"), false),
|
||||
RussianRuble("RUB", "RUB", "Russian Ruble", setOf("RUSSIAN FEDERATION (THE)"), false),
|
||||
RwandaFranc("RWF", "RWF", "Rwanda Franc", setOf("RWANDA"), false),
|
||||
SaudiRiyal("SAR", "SAR", "Saudi Riyal", setOf("SAUDI ARABIA"), false),
|
||||
SolomonIslandsDollar("SBD", "SBD", "Solomon Islands Dollar", setOf("SOLOMON ISLANDS"), false),
|
||||
SeychellesRupee("SCR", "SCR", "Seychelles Rupee", setOf("SEYCHELLES"), false),
|
||||
SudanesePound("SDG", "SDG", "Sudanese Pound", setOf("SUDAN (THE)"), false),
|
||||
SwedishKrona("SEK", "SEK", "Swedish Krona", setOf("SWEDEN"), true),
|
||||
SingaporeDollar("SGD", "SGD", "Singapore Dollar", setOf("SINGAPORE"), false),
|
||||
SaintHelenaPound("SHP", "SHP", "Saint Helena Pound", setOf("SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA"), false),
|
||||
SierraLeone_NewValuation2022("SLE", "SLE", "Sierra Leone (new valuation 2022)", setOf("SIERRA LEONE (new valuation 2022)"), false),
|
||||
SomaliShilling("SOS", "SOS", "Somali Shilling", setOf("SOMALIA"), false),
|
||||
SurinamDollar("SRD", "SRD", "Surinam Dollar", setOf("SURINAME"), false),
|
||||
SouthSudanesePound("SSP", "SSP", "South Sudanese Pound", setOf("SOUTH SUDAN"), false),
|
||||
Dobra("STN", "STN", "Dobra", setOf("SAO TOME AND PRINCIPE"), false),
|
||||
ElSalvadorColon("SVC", "SVC", "El Salvador Colon", setOf("EL SALVADOR"), false),
|
||||
SyrianPound("SYP", "SYP", "Syrian Pound", setOf("SYRIAN ARAB REPUBLIC"), false),
|
||||
Lilangeni("SZL", "SZL", "Lilangeni", setOf("ESWATINI"), false),
|
||||
Baht("THB", "THB", "Baht", setOf("THAILAND"), false),
|
||||
Somoni("TJS", "TJS", "Somoni", setOf("TAJIKISTAN"), false),
|
||||
TurkmenistanNewManat("TMT", "TMT", "Turkmenistan New Manat", setOf("TURKMENISTAN"), false),
|
||||
TunisianDinar("TND", "TND", "Tunisian Dinar", setOf("TUNISIA"), false),
|
||||
Paanga("TOP", "TOP", "Pa’anga", setOf("TONGA"), false),
|
||||
TurkishLira("TRY", "TRY", "Turkish Lira", setOf("TURKEY"), false),
|
||||
TrinidadAndTobagoDollar("TTD", "TTD", "Trinidad and Tobago Dollar", setOf("TRINIDAD AND TOBAGO"), false),
|
||||
NewTaiwanDollar("TWD", "NT$", "New Taiwan Dollar", setOf("TAIWAN (PROVINCE OF CHINA)"), false),
|
||||
TanzanianShilling("TZS", "TZS", "Tanzanian Shilling", setOf("TANZANIA, UNITED REPUBLIC OF"), false),
|
||||
Hryvnia("UAH", "UAH", "Hryvnia", setOf("UKRAINE"), false),
|
||||
UgandaShilling("UGX", "UGX", "Uganda Shilling", setOf("UGANDA"), false),
|
||||
USDollar("USD", "$", "US Dollar", setOf("AMERICAN SAMOA", "BONAIRE, SINT EUSTATIUS AND SABA", "BRITISH INDIAN OCEAN TERRITORY (THE)", "ECUADOR", "EL SALVADOR", "GUAM", "HAITI", "MARSHALL ISLANDS (THE)", "MICRONESIA (FEDERATED STATES OF)", "NORTHERN MARIANA ISLANDS (THE)", "PALAU", "PANAMA", "PUERTO RICO", "TIMOR-LESTE", "TURKS AND CAICOS ISLANDS (THE)", "UNITED STATES MINOR OUTLYING ISLANDS (THE)", "UNITED STATES OF AMERICA (THE)", "VIRGIN ISLANDS (BRITISH)", "VIRGIN ISLANDS (U.S.)"), true),
|
||||
USDollarNextDay("USN", "USN", "US Dollar (Next day)", setOf("UNITED STATES OF AMERICA (THE)"), false),
|
||||
UruguayPesoEnUnidadesIndexadasUI("UYI", "UYI", "Uruguay Peso en Unidades Indexadas (UI)", setOf("URUGUAY"), false),
|
||||
PesoUruguayo("UYU", "UYU", "Peso Uruguayo", setOf("URUGUAY"), false),
|
||||
UnidadPrevisional("UYW", null, "Unidad Previsional", setOf("URUGUAY"), false),
|
||||
UzbekistanSum("UZS", "UZS", "Uzbekistan Sum", setOf("UZBEKISTAN"), false),
|
||||
BolivarSoberano_NewValuation("VED", "VED", "Bolívar Soberano, new valuation", emptySet(), false),
|
||||
BolivarSoberano("VES", "VES", "Bolívar Soberano", setOf("VENEZUELA (BOLIVARIAN REPUBLIC OF)"), false),
|
||||
Dong("VND", "₫", "Dong", setOf("VIET NAM"), false),
|
||||
Vatu("VUV", "VUV", "Vatu", setOf("VANUATU"), false),
|
||||
Tala("WST", "WST", "Tala", setOf("SAMOA"), false),
|
||||
CFAFrancBEAC("XAF", "FCFA", "CFA Franc BEAC", setOf("CAMEROON", "CENTRAL AFRICAN REPUBLIC (THE)", "CHAD", "CONGO (THE)", "EQUATORIAL GUINEA", "GABON"), false),
|
||||
Silver("XAG", "XAG", "Silver", setOf("ZZ11_Silver"), false),
|
||||
Gold("XAU", "XAU", "Gold", setOf("ZZ08_Gold"), false),
|
||||
BondMarketsUnitEuropeanCompositeUnitEURCO("XBA", "XBA", "Bond Markets Unit European Composite Unit (EURCO)", setOf("ZZ01_Bond Markets Unit European_EURCO"), false),
|
||||
BondMarketsUnitEuropeanMonetaryUnitEMU6("XBB", "XBB", "Bond Markets Unit European Monetary Unit (E.M.U.-6)", setOf("ZZ02_Bond Markets Unit European_EMU-6"), false),
|
||||
BondMarketsUnitEuropeanUnitOfAccount9EUA9("XBC", "XBC", "Bond Markets Unit European Unit of Account 9 (E.U.A.-9)", setOf("ZZ03_Bond Markets Unit European_EUA-9"), false),
|
||||
BondMarketsUnitEuropeanUnitOfAccount17EUA17("XBD", "XBD", "Bond Markets Unit European Unit of Account 17 (E.U.A.-17)", setOf("ZZ04_Bond Markets Unit European_EUA-17"), false),
|
||||
EastCaribbeanDollar("XCD", "EC$", "East Caribbean Dollar", setOf("ANGUILLA", "ANTIGUA AND BARBUDA", "DOMINICA", "GRENADA", "MONTSERRAT", "SAINT KITTS AND NEVIS", "SAINT LUCIA", "SAINT VINCENT AND THE GRENADINES"), false),
|
||||
SDRSpecialDrawingRight("XDR", "XDR", "SDR (Special Drawing Right)", setOf("INTERNATIONAL MONETARY FUND (IMF)"), false),
|
||||
CFAFrancBCEAO("XOF", "F CFA", "CFA Franc BCEAO", setOf("BENIN", "BURKINA FASO", "CÔTE D'IVOIRE", "GUINEA-BISSAU", "MALI", "NIGER (THE)", "SENEGAL", "TOGO"), false),
|
||||
Palladium("XPD", "XPD", "Palladium", setOf("ZZ09_Palladium"), false),
|
||||
CFPFranc("XPF", "CFPF", "CFP Franc", setOf("FRENCH POLYNESIA", "NEW CALEDONIA", "WALLIS AND FUTUNA"), false),
|
||||
Platinum("XPT", "XPT", "Platinum", setOf("ZZ10_Platinum"), false),
|
||||
Sucre("XSU", "XSU", "Sucre", setOf("SISTEMA UNITARIO DE COMPENSACION REGIONAL DE PAGOS 'SUCRE'"), false),
|
||||
CodesSpecificallyReservedForTestingPurposes("XTS", "XTS", "Codes specifically reserved for testing purposes", setOf("ZZ06_Testing_Code"), false),
|
||||
ADBUnitOfAccount("XUA", "XUA", "ADB Unit of Account", setOf("MEMBER COUNTRIES OF THE AFRICAN DEVELOPMENT BANK GROUP"), false),
|
||||
TheCodesAssignedForTransactionsWhereNoCurrencyIsInvolved("XXX", "¤", "The codes assigned for transactions where no currency is involved", setOf("ZZ07_No_Currency"), false),
|
||||
YemeniRial("YER", "YER", "Yemeni Rial", setOf("YEMEN"), false),
|
||||
Rand("ZAR", "ZAR", "Rand", setOf("LESOTHO", "NAMIBIA", "SOUTH AFRICA"), false),
|
||||
ZambianKwacha("ZMW", "ZMW", "Zambian Kwacha", setOf("ZAMBIA"), false),
|
||||
ZimbabweGold("ZWG", null, "Zimbabwe Gold", emptySet(), false),
|
||||
ZimbabweDollar("ZWL", "ZWL", "Zimbabwe Dollar", setOf("ZIMBABWE"), false),
|
||||
enum class Currency(val alpha3Code: String, val numericCode: Int?, val currencySymbol: String?, val englishName: String, val countries: Set<String>, val isFrequentlyUsedValue: Boolean) {
|
||||
UAEDirham("AED", 784, "AED", "UAE Dirham", setOf("UNITED ARAB EMIRATES (THE)"), false),
|
||||
Afghani("AFN", 971, "AFN", "Afghani", setOf("AFGHANISTAN"), false),
|
||||
Lek("ALL", 8, "ALL", "Lek", setOf("ALBANIA"), false),
|
||||
ArmenianDram("AMD", 51, "AMD", "Armenian Dram", setOf("ARMENIA"), false),
|
||||
NetherlandsAntilleanGuilder("ANG", 532, "ANG", "Netherlands Antillean Guilder", setOf("CURAÇAO", "SINT MAARTEN (DUTCH PART)"), false),
|
||||
Kwanza("AOA", 973, "AOA", "Kwanza", setOf("ANGOLA"), false),
|
||||
ArgentinePeso("ARS", 32, "ARS", "Argentine Peso", setOf("ARGENTINA"), false),
|
||||
AustralianDollar("AUD", 36, "A$", "Australian Dollar", setOf("AUSTRALIA", "CHRISTMAS ISLAND", "COCOS (KEELING) ISLANDS (THE)", "HEARD ISLAND AND McDONALD ISLANDS", "KIRIBATI", "NAURU", "NORFOLK ISLAND", "TUVALU"), false),
|
||||
ArubanFlorin("AWG", 533, "AWG", "Aruban Florin", setOf("ARUBA"), false),
|
||||
AzerbaijanManat("AZN", 944, "AZN", "Azerbaijan Manat", setOf("AZERBAIJAN"), false),
|
||||
ConvertibleMark("BAM", 977, "BAM", "Convertible Mark", setOf("BOSNIA AND HERZEGOVINA"), false),
|
||||
BarbadosDollar("BBD", 52, "BBD", "Barbados Dollar", setOf("BARBADOS"), false),
|
||||
Taka("BDT", 50, "BDT", "Taka", setOf("BANGLADESH"), false),
|
||||
BulgarianLev("BGN", 975, "BGN", "Bulgarian Lev", setOf("BULGARIA"), false),
|
||||
BahrainiDinar("BHD", 48, "BHD", "Bahraini Dinar", setOf("BAHRAIN"), false),
|
||||
BurundiFranc("BIF", 108, "BIF", "Burundi Franc", setOf("BURUNDI"), false),
|
||||
BermudianDollar("BMD", 60, "BMD", "Bermudian Dollar", setOf("BERMUDA"), false),
|
||||
BruneiDollar("BND", 96, "BND", "Brunei Dollar", setOf("BRUNEI DARUSSALAM"), false),
|
||||
Boliviano("BOB", 68, "BOB", "Boliviano", setOf("BOLIVIA (PLURINATIONAL STATE OF)"), false),
|
||||
Mvdol("BOV", 984, "BOV", "Mvdol", setOf("BOLIVIA (PLURINATIONAL STATE OF)"), false),
|
||||
BrazilianReal("BRL", 986, "R$", "Brazilian Real", setOf("BRAZIL"), false),
|
||||
BahamianDollar("BSD", 44, "BSD", "Bahamian Dollar", setOf("BAHAMAS (THE)"), false),
|
||||
Ngultrum("BTN", 64, "BTN", "Ngultrum", setOf("BHUTAN"), false),
|
||||
Pula("BWP", 72, "BWP", "Pula", setOf("BOTSWANA"), false),
|
||||
BelarusianRuble("BYN", 933, "BYN", "Belarusian Ruble", setOf("BELARUS"), false),
|
||||
BelizeDollar("BZD", 84, "BZD", "Belize Dollar", setOf("BELIZE"), false),
|
||||
CanadianDollar("CAD", 124, "CA$", "Canadian Dollar", setOf("CANADA"), false),
|
||||
CongoleseFranc("CDF", 976, "CDF", "Congolese Franc", setOf("CONGO (THE DEMOCRATIC REPUBLIC OF THE)"), false),
|
||||
WIREuro("CHE", 947, "CHE", "WIR Euro", setOf("SWITZERLAND"), false),
|
||||
SwissFranc("CHF", 756, "CHF", "Swiss Franc", setOf("LIECHTENSTEIN", "SWITZERLAND"), true),
|
||||
WIRFranc("CHW", 948, "CHW", "WIR Franc", setOf("SWITZERLAND"), false),
|
||||
UnidadDeFomento("CLF", 990, "CLF", "Unidad de Fomento", setOf("CHILE"), false),
|
||||
ChileanPeso("CLP", 152, "CLP", "Chilean Peso", setOf("CHILE"), false),
|
||||
YuanRenminbi("CNY", 156, "CN¥", "Yuan Renminbi", setOf("CHINA"), false),
|
||||
ColombianPeso("COP", 170, "COP", "Colombian Peso", setOf("COLOMBIA"), false),
|
||||
UnidadDeValorReal("COU", 970, "COU", "Unidad de Valor Real", setOf("COLOMBIA"), false),
|
||||
CostaRicanColon("CRC", 188, "CRC", "Costa Rican Colon", setOf("COSTA RICA"), false),
|
||||
PesoConvertible("CUC", 931, "CUC", "Peso Convertible", setOf("CUBA"), false),
|
||||
CubanPeso("CUP", 192, "CUP", "Cuban Peso", setOf("CUBA"), false),
|
||||
CaboVerdeEscudo("CVE", 132, "CVE", "Cabo Verde Escudo", setOf("CABO VERDE"), false),
|
||||
CzechKoruna("CZK", 203, "CZK", "Czech Koruna", setOf("CZECHIA"), true),
|
||||
DjiboutiFranc("DJF", 262, "DJF", "Djibouti Franc", setOf("DJIBOUTI"), false),
|
||||
DanishKrone("DKK", 208, "DKK", "Danish Krone", setOf("DENMARK", "FAROE ISLANDS (THE)", "GREENLAND"), true),
|
||||
DominicanPeso("DOP", 214, "DOP", "Dominican Peso", setOf("DOMINICAN REPUBLIC (THE)"), false),
|
||||
AlgerianDinar("DZD", 12, "DZD", "Algerian Dinar", setOf("ALGERIA"), false),
|
||||
EgyptianPound("EGP", 818, "EGP", "Egyptian Pound", setOf("EGYPT"), false),
|
||||
Nakfa("ERN", 232, "ERN", "Nakfa", setOf("ERITREA"), false),
|
||||
EthiopianBirr("ETB", 230, "ETB", "Ethiopian Birr", setOf("ETHIOPIA"), false),
|
||||
Euro("EUR", 978, "€", "Euro", setOf("ÅLAND ISLANDS", "ANDORRA", "AUSTRIA", "BELGIUM", "CYPRUS", "ESTONIA", "EUROPEAN UNION", "FINLAND", "FRANCE", "FRENCH GUIANA", "FRENCH SOUTHERN TERRITORIES (THE)", "GERMANY", "GREECE", "GUADELOUPE", "HOLY SEE (THE)", "IRELAND", "ITALY", "LATVIA", "LITHUANIA", "LUXEMBOURG", "MALTA", "MARTINIQUE", "MAYOTTE", "MONACO", "MONTENEGRO", "NETHERLANDS (THE)", "PORTUGAL", "RÉUNION", "SAINT BARTHÉLEMY", "SAINT MARTIN (FRENCH PART)", "SAINT PIERRE AND MIQUELON", "SAN MARINO", "SLOVAKIA", "SLOVENIA", "SPAIN"), true),
|
||||
FijiDollar("FJD", 242, "FJD", "Fiji Dollar", setOf("FIJI"), false),
|
||||
FalklandIslandsPound("FKP", 238, "FKP", "Falkland Islands Pound", setOf("FALKLAND ISLANDS (THE) [MALVINAS]"), false),
|
||||
PoundSterling("GBP", 826, "£", "Pound Sterling", setOf("GUERNSEY", "ISLE OF MAN", "JERSEY", "UNITED KINGDOM OF GREAT BRITAIN AND NORTHERN IRELAND (THE)"), true),
|
||||
Lari("GEL", 981, "GEL", "Lari", setOf("GEORGIA"), false),
|
||||
GhanaCedi("GHS", 936, "GHS", "Ghana Cedi", setOf("GHANA"), false),
|
||||
GibraltarPound("GIP", 292, "GIP", "Gibraltar Pound", setOf("GIBRALTAR"), false),
|
||||
Dalasi("GMD", 270, "GMD", "Dalasi", setOf("GAMBIA (THE)"), false),
|
||||
GuineanFranc("GNF", 324, "GNF", "Guinean Franc", setOf("GUINEA"), false),
|
||||
Quetzal("GTQ", 320, "GTQ", "Quetzal", setOf("GUATEMALA"), false),
|
||||
GuyanaDollar("GYD", 328, "GYD", "Guyana Dollar", setOf("GUYANA"), false),
|
||||
HongKongDollar("HKD", 344, "HK$", "Hong Kong Dollar", setOf("HONG KONG"), false),
|
||||
Lempira("HNL", 340, "HNL", "Lempira", setOf("HONDURAS"), false),
|
||||
Gourde("HTG", 332, "HTG", "Gourde", setOf("HAITI"), false),
|
||||
Forint("HUF", 348, "HUF", "Forint", setOf("HUNGARY"), false),
|
||||
Rupiah("IDR", 360, "IDR", "Rupiah", setOf("INDONESIA"), false),
|
||||
NewIsraeliSheqel("ILS", 376, "₪", "New Israeli Sheqel", setOf("ISRAEL"), false),
|
||||
IndianRupee("INR", 356, "₹", "Indian Rupee", setOf("BHUTAN", "INDIA"), false),
|
||||
IraqiDinar("IQD", 368, "IQD", "Iraqi Dinar", setOf("IRAQ"), false),
|
||||
IranianRial("IRR", 364, "IRR", "Iranian Rial", setOf("IRAN (ISLAMIC REPUBLIC OF)"), false),
|
||||
IcelandKrona("ISK", 352, "ISK", "Iceland Krona", setOf("ICELAND"), true),
|
||||
JamaicanDollar("JMD", 388, "JMD", "Jamaican Dollar", setOf("JAMAICA"), false),
|
||||
JordanianDinar("JOD", 400, "JOD", "Jordanian Dinar", setOf("JORDAN"), false),
|
||||
Yen("JPY", 392, "¥", "Yen", setOf("JAPAN"), false),
|
||||
KenyanShilling("KES", 404, "KES", "Kenyan Shilling", setOf("KENYA"), false),
|
||||
Som("KGS", 417, "KGS", "Som", setOf("KYRGYZSTAN"), false),
|
||||
Riel("KHR", 116, "KHR", "Riel", setOf("CAMBODIA"), false),
|
||||
ComorianFranc("KMF", 174, "KMF", "Comorian Franc", setOf("COMOROS (THE)"), false),
|
||||
NorthKoreanWon("KPW", 408, "KPW", "North Korean Won", setOf("KOREA (THE DEMOCRATIC PEOPLE’S REPUBLIC OF)"), false),
|
||||
Won("KRW", 410, "₩", "Won", setOf("KOREA (THE REPUBLIC OF)"), false),
|
||||
KuwaitiDinar("KWD", 414, "KWD", "Kuwaiti Dinar", setOf("KUWAIT"), false),
|
||||
CaymanIslandsDollar("KYD", 136, "KYD", "Cayman Islands Dollar", setOf("CAYMAN ISLANDS (THE)"), false),
|
||||
Tenge("KZT", 398, "KZT", "Tenge", setOf("KAZAKHSTAN"), false),
|
||||
LaoKip("LAK", 418, "LAK", "Lao Kip", setOf("LAO PEOPLE’S DEMOCRATIC REPUBLIC (THE)"), false),
|
||||
LebanesePound("LBP", 422, "LBP", "Lebanese Pound", setOf("LEBANON"), false),
|
||||
SriLankaRupee("LKR", 144, "LKR", "Sri Lanka Rupee", setOf("SRI LANKA"), false),
|
||||
LiberianDollar("LRD", 430, "LRD", "Liberian Dollar", setOf("LIBERIA"), false),
|
||||
Loti("LSL", 426, "LSL", "Loti", setOf("LESOTHO"), false),
|
||||
LibyanDinar("LYD", 434, "LYD", "Libyan Dinar", setOf("LIBYA"), false),
|
||||
MoroccanDirham("MAD", 504, "MAD", "Moroccan Dirham", setOf("MOROCCO", "WESTERN SAHARA"), false),
|
||||
MoldovanLeu("MDL", 498, "MDL", "Moldovan Leu", setOf("MOLDOVA (THE REPUBLIC OF)"), false),
|
||||
MalagasyAriary("MGA", 969, "MGA", "Malagasy Ariary", setOf("MADAGASCAR"), false),
|
||||
Denar("MKD", 807, "MKD", "Denar", setOf("MACEDONIA (THE FORMER YUGOSLAV REPUBLIC OF)"), false),
|
||||
Kyat("MMK", 104, "MMK", "Kyat", setOf("MYANMAR"), false),
|
||||
Tugrik("MNT", 496, "MNT", "Tugrik", setOf("MONGOLIA"), false),
|
||||
Pataca("MOP", 446, "MOP", "Pataca", setOf("MACAO"), false),
|
||||
Ouguiya("MRU", 929, "MRU", "Ouguiya", setOf("MAURITANIA"), false),
|
||||
MauritiusRupee("MUR", 480, "MUR", "Mauritius Rupee", setOf("MAURITIUS"), false),
|
||||
Rufiyaa("MVR", 462, "MVR", "Rufiyaa", setOf("MALDIVES"), false),
|
||||
MalawiKwacha("MWK", 454, "MWK", "Malawi Kwacha", setOf("MALAWI"), false),
|
||||
MexicanPeso("MXN", 484, "MX$", "Mexican Peso", setOf("MEXICO"), false),
|
||||
MexicanUnidadDeInversionUDI("MXV", 979, "MXV", "Mexican Unidad de Inversion (UDI)", setOf("MEXICO"), false),
|
||||
MalaysianRinggit("MYR", 458, "MYR", "Malaysian Ringgit", setOf("MALAYSIA"), false),
|
||||
MozambiqueMetical("MZN", 943, "MZN", "Mozambique Metical", setOf("MOZAMBIQUE"), false),
|
||||
NamibiaDollar("NAD", 516, "NAD", "Namibia Dollar", setOf("NAMIBIA"), false),
|
||||
Naira("NGN", 566, "NGN", "Naira", setOf("NIGERIA"), false),
|
||||
CordobaOro("NIO", 558, "NIO", "Cordoba Oro", setOf("NICARAGUA"), false),
|
||||
NorwegianKrone("NOK", 578, "NOK", "Norwegian Krone", setOf("BOUVET ISLAND", "NORWAY", "SVALBARD AND JAN MAYEN"), true),
|
||||
NepaleseRupee("NPR", 524, "NPR", "Nepalese Rupee", setOf("NEPAL"), false),
|
||||
NewZealandDollar("NZD", 554, "NZ$", "New Zealand Dollar", setOf("COOK ISLANDS (THE)", "NEW ZEALAND", "NIUE", "PITCAIRN", "TOKELAU"), false),
|
||||
RialOmani("OMR", 512, "OMR", "Rial Omani", setOf("OMAN"), false),
|
||||
Balboa("PAB", 590, "PAB", "Balboa", setOf("PANAMA"), false),
|
||||
Sol("PEN", 604, "PEN", "Sol", setOf("PERU"), false),
|
||||
Kina("PGK", 598, "PGK", "Kina", setOf("PAPUA NEW GUINEA"), false),
|
||||
PhilippinePeso("PHP", 608, "₱", "Philippine Peso", setOf("PHILIPPINES (THE)"), false),
|
||||
PakistanRupee("PKR", 586, "PKR", "Pakistan Rupee", setOf("PAKISTAN"), false),
|
||||
Zloty("PLN", 985, "PLN", "Zloty", setOf("POLAND"), true),
|
||||
Guarani("PYG", 600, "PYG", "Guarani", setOf("PARAGUAY"), false),
|
||||
QatariRial("QAR", 634, "QAR", "Qatari Rial", setOf("QATAR"), false),
|
||||
RomanianLeu("RON", 946, "RON", "Romanian Leu", setOf("ROMANIA"), false),
|
||||
SerbianDinar("RSD", 941, "RSD", "Serbian Dinar", setOf("SERBIA"), false),
|
||||
RussianRuble("RUB", 643, "RUB", "Russian Ruble", setOf("RUSSIAN FEDERATION (THE)"), false),
|
||||
RwandaFranc("RWF", 646, "RWF", "Rwanda Franc", setOf("RWANDA"), false),
|
||||
SaudiRiyal("SAR", 682, "SAR", "Saudi Riyal", setOf("SAUDI ARABIA"), false),
|
||||
SolomonIslandsDollar("SBD", 90, "SBD", "Solomon Islands Dollar", setOf("SOLOMON ISLANDS"), false),
|
||||
SeychellesRupee("SCR", 690, "SCR", "Seychelles Rupee", setOf("SEYCHELLES"), false),
|
||||
SudanesePound("SDG", 938, "SDG", "Sudanese Pound", setOf("SUDAN (THE)"), false),
|
||||
SwedishKrona("SEK", 752, "SEK", "Swedish Krona", setOf("SWEDEN"), true),
|
||||
SingaporeDollar("SGD", 702, "SGD", "Singapore Dollar", setOf("SINGAPORE"), false),
|
||||
SaintHelenaPound("SHP", 654, "SHP", "Saint Helena Pound", setOf("SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA"), false),
|
||||
Leone("SLE", 925, "SLE", "Sierra Leone (new valuation 2022)", setOf("SIERRA LEONE (new valuation 2022)"), false),
|
||||
SomaliShilling("SOS", 706, "SOS", "Somali Shilling", setOf("SOMALIA"), false),
|
||||
SurinamDollar("SRD", 968, "SRD", "Surinam Dollar", setOf("SURINAME"), false),
|
||||
SouthSudanesePound("SSP", 728, "SSP", "South Sudanese Pound", setOf("SOUTH SUDAN"), false),
|
||||
Dobra("STN", 930, "STN", "Dobra", setOf("SAO TOME AND PRINCIPE"), false),
|
||||
ElSalvadorColon("SVC", 222, "SVC", "El Salvador Colon", setOf("EL SALVADOR"), false),
|
||||
SyrianPound("SYP", 760, "SYP", "Syrian Pound", setOf("SYRIAN ARAB REPUBLIC"), false),
|
||||
Lilangeni("SZL", 748, "SZL", "Lilangeni", setOf("ESWATINI"), false),
|
||||
Baht("THB", 764, "THB", "Baht", setOf("THAILAND"), false),
|
||||
Somoni("TJS", 972, "TJS", "Somoni", setOf("TAJIKISTAN"), false),
|
||||
TurkmenistanNewManat("TMT", 934, "TMT", "Turkmenistan New Manat", setOf("TURKMENISTAN"), false),
|
||||
TunisianDinar("TND", 788, "TND", "Tunisian Dinar", setOf("TUNISIA"), false),
|
||||
Paanga("TOP", 776, "TOP", "Pa’anga", setOf("TONGA"), false),
|
||||
TurkishLira("TRY", 949, "TRY", "Turkish Lira", setOf("TURKEY"), false),
|
||||
TrinidadAndTobagoDollar("TTD", 780, "TTD", "Trinidad and Tobago Dollar", setOf("TRINIDAD AND TOBAGO"), false),
|
||||
NewTaiwanDollar("TWD", 901, "NT$", "New Taiwan Dollar", setOf("TAIWAN (PROVINCE OF CHINA)"), false),
|
||||
TanzanianShilling("TZS", 834, "TZS", "Tanzanian Shilling", setOf("TANZANIA, UNITED REPUBLIC OF"), false),
|
||||
Hryvnia("UAH", 980, "UAH", "Hryvnia", setOf("UKRAINE"), false),
|
||||
UgandaShilling("UGX", 800, "UGX", "Uganda Shilling", setOf("UGANDA"), false),
|
||||
USDollar("USD", 840, "$", "US Dollar", setOf("AMERICAN SAMOA", "BONAIRE, SINT EUSTATIUS AND SABA", "BRITISH INDIAN OCEAN TERRITORY (THE)", "ECUADOR", "EL SALVADOR", "GUAM", "HAITI", "MARSHALL ISLANDS (THE)", "MICRONESIA (FEDERATED STATES OF)", "NORTHERN MARIANA ISLANDS (THE)", "PALAU", "PANAMA", "PUERTO RICO", "TIMOR-LESTE", "TURKS AND CAICOS ISLANDS (THE)", "UNITED STATES MINOR OUTLYING ISLANDS (THE)", "UNITED STATES OF AMERICA (THE)", "VIRGIN ISLANDS (BRITISH)", "VIRGIN ISLANDS (U.S.)"), true),
|
||||
USDollarNextDay("USN", 997, "USN", "US Dollar (Next day)", setOf("UNITED STATES OF AMERICA (THE)"), false),
|
||||
UruguayPesoEnUnidadesIndexadasUI("UYI", 940, "UYI", "Uruguay Peso en Unidades Indexadas (UI)", setOf("URUGUAY"), false),
|
||||
PesoUruguayo("UYU", 858, "UYU", "Peso Uruguayo", setOf("URUGUAY"), false),
|
||||
UnidadPrevisional("UYW", 927, null, "Unidad Previsional", setOf("URUGUAY"), false),
|
||||
UzbekistanSum("UZS", 860, "UZS", "Uzbekistan Sum", setOf("UZBEKISTAN"), false),
|
||||
BolivarSoberano_NewValuation("VED", null, "VED", "Bolívar Soberano, new valuation", emptySet(), false),
|
||||
BolivarSoberano("VES", 928, "VES", "Bolívar Soberano", setOf("VENEZUELA (BOLIVARIAN REPUBLIC OF)"), false),
|
||||
Dong("VND", 704, "₫", "Dong", setOf("VIET NAM"), false),
|
||||
Vatu("VUV", 548, "VUV", "Vatu", setOf("VANUATU"), false),
|
||||
Tala("WST", 882, "WST", "Tala", setOf("SAMOA"), false),
|
||||
CFAFrancBEAC("XAF", 950, "FCFA", "CFA Franc BEAC", setOf("CAMEROON", "CENTRAL AFRICAN REPUBLIC (THE)", "CHAD", "CONGO (THE)", "EQUATORIAL GUINEA", "GABON"), false),
|
||||
Silver("XAG", 961, "XAG", "Silver", setOf("ZZ11_Silver"), false),
|
||||
Gold("XAU", 959, "XAU", "Gold", setOf("ZZ08_Gold"), false),
|
||||
BondMarketsUnitEuropeanCompositeUnitEURCO("XBA", 955, "XBA", "Bond Markets Unit European Composite Unit (EURCO)", setOf("ZZ01_Bond Markets Unit European_EURCO"), false),
|
||||
BondMarketsUnitEuropeanMonetaryUnitEMU6("XBB", 956, "XBB", "Bond Markets Unit European Monetary Unit (E.M.U.-6)", setOf("ZZ02_Bond Markets Unit European_EMU-6"), false),
|
||||
BondMarketsUnitEuropeanUnitOfAccount9EUA9("XBC", 957, "XBC", "Bond Markets Unit European Unit of Account 9 (E.U.A.-9)", setOf("ZZ03_Bond Markets Unit European_EUA-9"), false),
|
||||
BondMarketsUnitEuropeanUnitOfAccount17EUA17("XBD", 958, "XBD", "Bond Markets Unit European Unit of Account 17 (E.U.A.-17)", setOf("ZZ04_Bond Markets Unit European_EUA-17"), false),
|
||||
EastCaribbeanDollar("XCD", 951, "EC$", "East Caribbean Dollar", setOf("ANGUILLA", "ANTIGUA AND BARBUDA", "DOMINICA", "GRENADA", "MONTSERRAT", "SAINT KITTS AND NEVIS", "SAINT LUCIA", "SAINT VINCENT AND THE GRENADINES"), false),
|
||||
SDRSpecialDrawingRight("XDR", 960, "XDR", "SDR (Special Drawing Right)", setOf("INTERNATIONAL MONETARY FUND (IMF)"), false),
|
||||
CFAFrancBCEAO("XOF", 952, "F CFA", "CFA Franc BCEAO", setOf("BENIN", "BURKINA FASO", "CÔTE D'IVOIRE", "GUINEA-BISSAU", "MALI", "NIGER (THE)", "SENEGAL", "TOGO"), false),
|
||||
Palladium("XPD", 964, "XPD", "Palladium", setOf("ZZ09_Palladium"), false),
|
||||
CFPFranc("XPF", 953, "CFPF", "CFP Franc", setOf("FRENCH POLYNESIA", "NEW CALEDONIA", "WALLIS AND FUTUNA"), false),
|
||||
Platinum("XPT", 962, "XPT", "Platinum", setOf("ZZ10_Platinum"), false),
|
||||
Sucre("XSU", 994, "XSU", "Sucre", setOf("SISTEMA UNITARIO DE COMPENSACION REGIONAL DE PAGOS 'SUCRE'"), false),
|
||||
CodesSpecificallyReservedForTestingPurposes("XTS", 963, "XTS", "Codes specifically reserved for testing purposes", setOf("ZZ06_Testing_Code"), false),
|
||||
ADBUnitOfAccount("XUA", 965, "XUA", "ADB Unit of Account", setOf("MEMBER COUNTRIES OF THE AFRICAN DEVELOPMENT BANK GROUP"), false),
|
||||
TheCodesAssignedForTransactionsWhereNoCurrencyIsInvolved("XXX", 999, "¤", "The codes assigned for transactions where no currency is involved", setOf("ZZ07_No_Currency"), false),
|
||||
YemeniRial("YER", 886, "YER", "Yemeni Rial", setOf("YEMEN"), false),
|
||||
Rand("ZAR", 710, "ZAR", "Rand", setOf("LESOTHO", "NAMIBIA", "SOUTH AFRICA"), false),
|
||||
ZambianKwacha("ZMW", 967, "ZMW", "Zambian Kwacha", setOf("ZAMBIA"), false),
|
||||
ZimbabweGold("ZWG", 924, null, "Zimbabwe Gold", emptySet(), false),
|
||||
ZimbabweDollar("ZWL", null, "ZWL", "Zimbabwe Dollar", setOf("ZIMBABWE"), false),
|
||||
}
|
|
@ -38,7 +38,7 @@ class CodeGenerator {
|
|||
writer.appendLine("enum class ${type.className}(${columns.joinToString(", ") { "val ${getPropertyName(it)}: ${getDataType(it, columns, rows)}" } }) {")
|
||||
|
||||
rows.forEach { row ->
|
||||
writer.appendLine("\t${getEnumName(type, columns, row.values)}(${row.values.joinToString(", ") { getPropertyValue(it) } }),")
|
||||
writer.appendLine("\t${getEnumName(type, columns, row.values)}(${row.values.joinToString(", ") { getPropertyValue(it, type != CodeListType.IsoCurrencyCodes) } }),")
|
||||
}
|
||||
writer.append("}")
|
||||
}
|
||||
|
@ -112,9 +112,10 @@ class CodeGenerator {
|
|||
private fun mergeCurrencyData(cefCodeList: CodeList, zugferdCodeList: net.codinux.invoicing.parser.excel.CodeList): Pair<List<Column>, List<Row>> {
|
||||
val columns = listOf(
|
||||
Column(0, "alpha3Code", "String", "alpha3Code"),
|
||||
Column(1, "currencySymbol", "String", "currencySymbol"),
|
||||
Column(2, "englishName", "String", "englishName"),
|
||||
Column(3, "countries", "Set<String>", "countries"),
|
||||
Column(1, "numericCode", "Int", "numericCode"),
|
||||
Column(2, "currencySymbol", "String", "currencySymbol"),
|
||||
Column(3, "englishName", "String", "englishName"),
|
||||
Column(4, "countries", "Set<String>", "countries"),
|
||||
Column(Int.MAX_VALUE, "isFrequentlyUsedValue", "Boolean", "isFrequentlyUsedValue")
|
||||
)
|
||||
|
||||
|
@ -124,8 +125,10 @@ class CodeGenerator {
|
|||
|
||||
val rows = cefByIsoCode.map { (isoCode, cefRow) ->
|
||||
val zugferdRows = zugferdByIsoCode[isoCode] ?: emptyList()
|
||||
val i18nCurrency = i18nCurrenciesByCode[isoCode]
|
||||
// as Zugferd list only lists current currencies, there's currently no use for i18n.Currency.isCurrentCurrency and .withdrawalDate
|
||||
val isFrequentlyUsedValue = zugferdRows.any { it.isFrequentlyUsedValue }
|
||||
Row(listOf(isoCode, availableCurrencies[isoCode]?.symbol, cefRow.values[1], zugferdRows.map { it.values[0] }.toSet(), isFrequentlyUsedValue), isFrequentlyUsedValue)
|
||||
Row(listOf(isoCode, i18nCurrency?.numericCode, availableCurrencies[isoCode]?.symbol, cefRow.values[1], zugferdRows.map { it.values[0] }.toSet(), isFrequentlyUsedValue), isFrequentlyUsedValue)
|
||||
}
|
||||
|
||||
return columns to rows
|
||||
|
@ -157,19 +160,23 @@ class CodeGenerator {
|
|||
else -> column.name.replace(" ", "").let { it[0].lowercase() + it.substring(1) }
|
||||
}
|
||||
|
||||
private fun getPropertyValue(value: Any?): CharSequence {
|
||||
private fun getPropertyValue(value: Any?, writeNumbersAsString: Boolean = true): CharSequence {
|
||||
if (value == null) {
|
||||
return "null"
|
||||
}
|
||||
|
||||
if (value is InvoiceTypeUseFor) {
|
||||
return "InvoiceTypeUseFor.$value"
|
||||
}
|
||||
|
||||
if (value is Boolean) {
|
||||
return "$value"
|
||||
}
|
||||
|
||||
if (value is Number && writeNumbersAsString == false) {
|
||||
return "$value"
|
||||
}
|
||||
|
||||
if (value is InvoiceTypeUseFor) {
|
||||
return "InvoiceTypeUseFor.$value"
|
||||
}
|
||||
|
||||
if (value is Set<*>) {
|
||||
return if (value.isEmpty()) "emptySet()" else "setOf(${value.joinToString(", ") { getPropertyValue(it) } })"
|
||||
}
|
||||
|
@ -198,7 +205,7 @@ class CodeGenerator {
|
|||
else if (firstColumn == "application/vnd.oasis.opendocument.spreadsheet") return "OpenDocumentSpreadsheet"
|
||||
|
||||
val column = if (type == CodeListType.IsoCountryCodes) i18nRegionsByCode[firstColumn]?.name ?: fixCountryName(row[2])
|
||||
else if (type == CodeListType.IsoCurrencyCodes) i18nCurrenciesByCode[firstColumn]?.name ?: fixCurrencyName(row[2]) // as fallback use currency's English name from Zugferd list
|
||||
else if (type == CodeListType.IsoCurrencyCodes) i18nCurrenciesByCode[firstColumn]?.name ?: fixCurrencyName(row[3]) // as fallback use currency's English name from Zugferd list
|
||||
else if (columns.first().name == "Scheme ID") row[1] // ISO 6523 Scheme Identifier codes
|
||||
else row[0] // default case: the code is in the first column
|
||||
|
||||
|
|
Loading…
Reference in New Issue