diff --git a/core/doctype/customize_form/customize_form.js b/core/doctype/customize_form/customize_form.js index 11a6e42fd1..b2880d362b 100644 --- a/core/doctype/customize_form/customize_form.js +++ b/core/doctype/customize_form/customize_form.js @@ -35,7 +35,8 @@ cur_frm.fields_dict.doc_type.get_query = function(doc, dt, dn) { return 'SELECT name FROM `tabDocType` \ WHERE IFNULL(issingle,0)=0 AND \ IFNULL(in_create, 0)=0 AND \ - module != "Core" AND \ + name not in ("DocType", "DocField", "DocPerm", "Profile", "Role", "UserRole", "Page", \ + "Page Role", "Module Def", "Print Format", "Report", "Search Criteria") AND \ name LIKE "%s%%" ORDER BY name ASC LIMIT 50'; } diff --git a/webnotes/boot.py b/webnotes/boot.py index 6daf3d7894..ef7e9291db 100644 --- a/webnotes/boot.py +++ b/webnotes/boot.py @@ -55,6 +55,7 @@ def get_bootinfo(): add_home_page(bootinfo, doclist) add_allowed_pages(bootinfo) load_translations(bootinfo) + load_country_and_currency(bootinfo, doclist) # ipinfo if webnotes.session['data'].get('ipinfo'): @@ -77,6 +78,12 @@ def get_bootinfo(): return bootinfo +def load_country_and_currency(bootinfo, doclist): + country_doc = webnotes.doc("Country", bootinfo.sysdefaults.country) + doclist += [country_doc] + if country_doc.currency: + doclist += [webnotes.doc("Currency", country_doc.currency)] + def add_allowed_pages(bootinfo): bootinfo.allowed_pages = [p[0] for p in webnotes.conn.sql("""select distinct parent from `tabPage Role` where role in ('%s')""" % "', '".join(webnotes.get_roles()))] diff --git a/webnotes/country_info.json b/webnotes/country_info.json index 6989790337..f036933c0a 100644 --- a/webnotes/country_info.json +++ b/webnotes/country_info.json @@ -33,28 +33,46 @@ "currency_name": "Canadian Dollar", "currency": "CAD", "currency_fraction_units": 100, - "currency_symbol": "$" + "currency_symbol": "$", + "number_format": "#,###.##" }, "Sao Tome and Principe": { "currency_name": "Dobra", - "currency": "STD" + "currency": "STD", + "number_format": "######" }, - "Venezuela, Bolivarian Republic of": {}, - "Guinea-Bissau": { + "Fiji": { + "currency_fraction": "Cent", "timezones": [ - "Africa/Bissau" + "Pacific/Fiji" ], - "currency_fraction": "Centime", + "currency_name": "Fiji Dollar", + "currency": "FJD", "currency_fraction_units": 100, - "currency_symbol": "Fr" + "currency_symbol": "$", + "number_format": "######" }, - "Montenegro": { + "Guernsey": { + "currency_fraction": "Penny", + "currency_fraction_units": 100, + "number_format": "#,###.##", + "currency_symbol": "\u00a3" + }, + "Turkmenistan": { + "currency_fraction": "Tennesi", "timezones": [ - "Europe/Podgorica" + "Asia/Ashgabat" ], - "currency_fraction": "Cent", + "currency_name": "Manat", + "currency": "TMM", "currency_fraction_units": 100, - "currency_symbol": "\u20ac" + "currency_symbol": "m", + "number_format": "######" + }, + "Iran, Islamic Republic of": { + "currency_name": "Iranian Rial", + "currency": "IRR", + "number_format": "#,###.##" }, "Lithuania": { "date_format": "yyyy-mm-dd", @@ -65,7 +83,8 @@ "currency_name": "Lithuanian Litas", "currency": "LTL", "currency_fraction_units": 100, - "currency_symbol": "Lt" + "currency_symbol": "Lt", + "number_format": "# ###,##" }, "Cambodia": { "currency_fraction": "Sen", @@ -75,21 +94,13 @@ "currency_name": "Riel", "currency": "KHR", "currency_fraction_units": 100, - "currency_symbol": "\u17db" + "currency_symbol": "\u17db", + "number_format": "######" }, "Saint Helena, Ascension and Tristan da Cunha": { "currency_name": "Saint Helena Pound", - "currency": "SHP" - }, - "Switzerland": { - "currency_fraction": "Rappen[K]", - "timezones": [ - "Europe/Zurich" - ], - "currency_name": "Swiss Franc", - "currency": "CHF", - "currency_fraction_units": 100, - "currency_symbol": "Fr" + "currency": "SHP", + "number_format": "######" }, "Ethiopia": { "timezones": [ @@ -97,6 +108,7 @@ ], "currency_fraction": "Santim", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "Br" }, "Aruba": { @@ -104,9 +116,20 @@ "currency_name": "Aruban Guilder", "currency": "AWG", "currency_fraction_units": 100, - "currency_symbol": "\u0192" + "currency_symbol": "\u0192", + "number_format": "#,###.##" + }, + "Swaziland": { + "currency_fraction": "Cent", + "timezones": [ + "Africa/Mbabane" + ], + "currency_name": "Lilangeni", + "currency": "SZL", + "currency_fraction_units": 100, + "currency_symbol": "L", + "number_format": "#, ###.##" }, - "Saint Martin (French part)": {}, "Argentina": { "currency_fraction": "Centavo", "timezones": [ @@ -124,7 +147,8 @@ "currency_name": "Argentine Peso", "currency": "ARS", "currency_fraction_units": 100, - "currency_symbol": "$" + "currency_symbol": "$", + "number_format": "#.###,##" }, "Cameroon": { "timezones": [ @@ -132,6 +156,7 @@ ], "currency_fraction": "Centime", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "Fr" }, "Burkina Faso": { @@ -140,24 +165,16 @@ ], "currency_fraction": "Centime", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "Fr" }, - "Turkmenistan": { - "currency_fraction": "Tennesi", - "timezones": [ - "Asia/Ashgabat" - ], - "currency_name": "Manat", - "currency": "TMM", - "currency_fraction_units": 100, - "currency_symbol": "m" - }, "Ghana": { "timezones": [ "Africa/Accra" ], "currency_fraction": "Pesewa", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u20b5" }, "Saudi Arabia": { @@ -168,49 +185,30 @@ "currency_name": "Saudi Riyal", "currency": "SAR", "currency_fraction_units": 100, - "currency_symbol": "\u0631.\u0633" + "currency_symbol": "\u0631.\u0633", + "number_format": "#,###.##" }, - "Rwanda": { - "currency_fraction": "Centime", - "timezones": [ - "Africa/Kigali" - ], - "currency_name": "Rwanda Franc", - "currency": "RWF", - "currency_fraction_units": 100, - "currency_symbol": "Fr" + "American Samoa": { + "number_format": "#,###.##" }, - "Togo": { - "timezones": [ - "Africa/Lome" - ], - "currency_fraction": "Centime", - "currency_fraction_units": 100, - "currency_symbol": "Fr" - }, - "Japan": { - "currency_fraction": "Sen[G]", - "timezones": [ - "Asia/Tokyo" - ], - "currency_name": "Yen", - "currency": "JPY", - "currency_fraction_units": 100, - "currency_symbol": "\u00a5" + "United States Minor Outlying Islands": { + "number_format": "#,###.##" }, - "American Samoa": {}, - "Montserrat": { + "Cocos (Keeling) Islands": { "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "$" }, - "United States Minor Outlying Islands": {}, - "Cocos (Keeling) Islands": { + "Slovenia": { + "timezones": [ + "Europe/Ljubljana" + ], "currency_fraction": "Cent", "currency_fraction_units": 100, - "currency_symbol": "$" + "number_format": "#,###.##", + "currency_symbol": "\u20ac" }, - "Pitcairn": {}, "Guatemala": { "currency_fraction": "Centavo", "timezones": [ @@ -219,7 +217,8 @@ "currency_name": "Quetzal", "currency": "GTQ", "currency_fraction_units": 100, - "currency_symbol": "Q" + "currency_symbol": "Q", + "number_format": "#,###.##" }, "Bosnia and Herzegovina": { "timezones": [ @@ -227,40 +226,47 @@ ], "currency_fraction": "Fening", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "KM or \u041a\u041c" }, - "Kuwait": { - "currency_fraction": "Fils", + "Guinea": { + "currency_fraction": "Centime", "timezones": [ - "Asia/Kuwait" + "Africa/Conakry" ], - "currency_name": "Kuwaiti Dinar", - "currency": "KWD", - "currency_fraction_units": 1000, - "currency_symbol": "\u062f.\u0643" + "currency_name": "Guinea Franc", + "currency": "GNF", + "currency_fraction_units": 100, + "currency_symbol": "Fr", + "number_format": "#,###.##" }, "Russian Federation": { "currency_name": "Russian Ruble", - "currency": "RUB" + "currency": "RUB", + "number_format": "#.###,##" }, - "Jordan": { - "currency_fraction": "Piastre[H]", + "Germany": { "timezones": [ - "Asia/Amman" + "Europe/Berlin" ], - "currency_name": "Jordanian Dinar", - "currency": "JOD", + "currency_fraction": "Cent", "currency_fraction_units": 100, - "currency_symbol": "\u062f.\u0627" + "number_format": "#,###.##", + "currency_symbol": "\u20ac" + }, + "Bonaire, Sint Eustatius and Saba": { + "number_format": "#,###.##" + }, + "Virgin Islands, British": { + "number_format": "#,###.##" }, - "Bonaire, Sint Eustatius and Saba": {}, - "Virgin Islands, British": {}, "Dominica": { "timezones": [ "America/Dominica" ], "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "$" }, "Liberia": { @@ -271,22 +277,36 @@ "currency_name": "Liberian Dollar", "currency": "LRD", "currency_fraction_units": 100, - "currency_symbol": "$" - }, - "Korea, Republic of": { - "currency_name": "Won", - "currency": "KRW" + "currency_symbol": "$", + "number_format": "######" }, - "Micronesia, Federated States of": {}, - "Jamaica": { + "Netherlands": { "currency_fraction": "Cent", + "currency_fraction_units": 100, + "number_format": "#,###.##", + "currency_symbol": "\u20ac" + }, + "Armenia": { + "currency_fraction": "Luma", "timezones": [ - "America/Jamaica" + "Asia/Yerevan" ], - "currency_name": "Jamaican Dollar", - "currency": "JMD", + "currency_name": "Armenian Dram", + "currency": "AMD", "currency_fraction_units": 100, - "currency_symbol": "$" + "currency_symbol": "\u058f", + "number_format": "#,###.##" + }, + "Pakistan": { + "currency_fraction": "Paisa", + "timezones": [ + "Asia/Karachi" + ], + "currency_name": "Pakistan Rupee", + "currency": "PKR", + "currency_fraction_units": 100, + "currency_symbol": "\u20a8", + "number_format": "#,###.##" }, "Oman": { "currency_fraction": "Baisa", @@ -296,14 +316,36 @@ "currency_name": "Rial Omani", "currency": "OMR", "currency_fraction_units": 1000, - "currency_symbol": "\u0631.\u0639." + "currency_symbol": "\u0631.\u0639.", + "number_format": "#,###.###" + }, + "Costa Rica": { + "currency_fraction": "C\u00e9ntimo", + "timezones": [ + "America/Costa_Rica" + ], + "currency_name": "Costa Rican Colon", + "currency": "CRC", + "currency_fraction_units": 100, + "currency_symbol": "\u20a1", + "number_format": "#.###,##" + }, + "Ivory Coast": { + "currency_fraction": "Centime", + "currency_fraction_units": 100, + "number_format": "#,###.##", + "currency_symbol": "Fr" + }, + "Christmas Island": { + "number_format": "#,###.##" + }, + "French Guiana": { + "number_format": "#,###.##" }, - "Martinique": {}, - "Christmas Island": {}, - "French Guiana": {}, "Niue": { "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "$" }, "Monaco": { @@ -312,11 +354,21 @@ ], "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u20ac" }, + "Bahamas": { + "currency_name": "Bahamian Dollar", + "currency": "BSD", + "number_format": "#,###.##", + "timezones": [ + "America/Nassau" + ] + }, "Wallis and Futuna": { "currency_fraction": "Centime", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "Fr" }, "New Zealand": { @@ -328,29 +380,34 @@ "currency_name": "New Zealand Dollar", "currency": "NZD", "currency_fraction_units": 100, - "currency_symbol": "$" + "currency_symbol": "$", + "number_format": "#,###.##" + }, + "Yemen": { + "timezones": [ + "Asia/Aden" + ], + "currency_fraction": "Fils", + "currency_fraction_units": 100, + "number_format": "#,###.##", + "currency_symbol": "\ufdfc" }, - "Virgin Islands, U.S.": {}, "Jersey": { "currency_fraction": "Penny", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u00a3" }, - "Andorra": { - "timezones": [ - "Europe/Andorra" - ], + "Jamaica": { "currency_fraction": "Cent", - "currency_fraction_units": 100, - "currency_symbol": "\u20ac" - }, - "Yemen": { "timezones": [ - "Asia/Aden" + "America/Jamaica" ], - "currency_fraction": "Fils", + "currency_name": "Jamaican Dollar", + "currency": "JMD", "currency_fraction_units": 100, - "currency_symbol": "\ufdfc" + "currency_symbol": "$", + "number_format": "#,###.##" }, "Albania": { "currency_fraction": "Qindark\u00eb", @@ -360,7 +417,8 @@ "currency_name": "Lek", "currency": "ALL", "currency_fraction_units": 100, - "currency_symbol": "L" + "currency_symbol": "L", + "number_format": "######" }, "Samoa": { "currency_fraction": "Sene", @@ -370,9 +428,18 @@ "currency_name": "Tala", "currency": "WST", "currency_fraction_units": 100, - "currency_symbol": "T" + "currency_symbol": "T", + "number_format": "######" + }, + "British Indian Ocean Territory": { + "currency_fraction": "Cent[D]", + "currency_fraction_units": 100, + "number_format": "#,###.##", + "currency_symbol": "$" + }, + "Norfolk Island": { + "number_format": "#,###.##" }, - "Norfolk Island": {}, "United Arab Emirates": { "currency_fraction": "Fils", "timezones": [ @@ -381,9 +448,12 @@ "currency_name": "UAE Dirham", "currency": "AED", "currency_fraction_units": 100, - "currency_symbol": "\u062f.\u0625" + "currency_symbol": "\u062f.\u0625", + "number_format": "#,###.##" + }, + "Guam": { + "number_format": "#,###.##" }, - "Guam": {}, "India": { "currency_fraction": "Paisa", "timezones": [ @@ -392,7 +462,8 @@ "currency_name": "Indian Rupee", "currency": "INR", "currency_fraction_units": 100, - "currency_symbol": "\u20b9" + "currency_symbol": "\u20b9", + "number_format": "#,##,###.##" }, "Azerbaijan": { "timezones": [ @@ -400,8 +471,18 @@ ], "currency_fraction": "Q\u0259pik", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "" }, + "Madagascar": { + "timezones": [ + "Indian/Antananarivo" + ], + "currency_fraction": "Iraimbilanja", + "currency_fraction_units": 5, + "number_format": "#,###.##", + "currency_symbol": "Ar" + }, "Lesotho": { "currency_fraction": "Sente", "timezones": [ @@ -410,7 +491,8 @@ "currency_name": "Loti", "currency": "LSL", "currency_fraction_units": 100, - "currency_symbol": "L" + "currency_symbol": "L", + "number_format": "######" }, "Saint Vincent and the Grenadines": { "timezones": [ @@ -418,6 +500,7 @@ ], "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "$" }, "Kenya": { @@ -428,11 +511,16 @@ "currency_name": "Kenyan Shilling", "currency": "KES", "currency_fraction_units": 100, - "currency_symbol": "Sh" + "currency_symbol": "Sh", + "number_format": "#,###.##" }, "Macao": { "currency_name": "Pataca", - "currency": "MOP" + "currency": "MOP", + "number_format": "######" + }, + "Greenland": { + "number_format": "#,###.##" }, "Turkey": { "timezones": [ @@ -440,6 +528,7 @@ ], "currency_fraction": "Kuru\u015f", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "" }, "Afghanistan": { @@ -448,8 +537,20 @@ ], "currency_fraction": "Pul", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u060b" }, + "Paraguay": { + "currency_fraction": "C\u00e9ntimo", + "timezones": [ + "America/Asuncion" + ], + "currency_name": "Guarani", + "currency": "PYG", + "currency_fraction_units": 100, + "currency_symbol": "\u20b2", + "number_format": "####" + }, "Bangladesh": { "currency_fraction": "Paisa", "timezones": [ @@ -458,17 +559,19 @@ "currency_name": "Taka", "currency": "BDT", "currency_fraction_units": 100, - "currency_symbol": "\u09f3" + "currency_symbol": "\u09f3", + "number_format": "#,###.##" }, - "Mauritania": { - "currency_fraction": "Khoums", + "Eritrea": { + "currency_fraction": "Cent", "timezones": [ - "Africa/Nouakchott" + "Africa/Asmera" ], - "currency_name": "Ouguiya", - "currency": "MRO", - "currency_fraction_units": 5, - "currency_symbol": "UM" + "currency_name": "Nakfa", + "currency": "ERN", + "currency_fraction_units": 100, + "currency_symbol": "Nfk", + "number_format": "######" }, "Solomon Islands": { "currency_fraction": "Cent", @@ -478,12 +581,13 @@ "currency_name": "Solomon Islands Dollar", "currency": "SBD", "currency_fraction_units": 100, - "currency_symbol": "$" + "currency_symbol": "$", + "number_format": "######" }, - "Turks and Caicos Islands": { - "currency_fraction": "Cent[D]", - "currency_fraction_units": 100, - "currency_symbol": "$" + "Viet Nam": { + "currency_name": "Dong", + "currency": "VND", + "number_format": "#.###" }, "Saint Lucia": { "timezones": [ @@ -491,6 +595,7 @@ ], "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "$" }, "San Marino": { @@ -499,11 +604,24 @@ ], "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u20ac" }, + "Cyprus": { + "currency_fraction": "Cent", + "timezones": [ + "Asia/Nicosia" + ], + "currency_name": "Cyprus Pound", + "currency": "CYP", + "currency_fraction_units": 100, + "currency_symbol": "\u20ac", + "number_format": "#.###,##" + }, "French Polynesia": { "currency_fraction": "Centime", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "Fr" }, "France": { @@ -512,18 +630,29 @@ ], "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u20ac" }, + "Korea, Democratic Peoples Republic of": { + "currency_name": "North Korean Won", + "currency": "KPW", + "number_format": "######" + }, "Syrian Arab Republic": { "currency_name": "Syrian Pound", - "currency": "SYP" + "currency": "SYP", + "number_format": "######" }, - "Bermuda": { - "currency_fraction": "Cent", - "currency_name": "Bermudian Dollar", - "currency": "BMD", + "Rwanda": { + "currency_fraction": "Centime", + "timezones": [ + "Africa/Kigali" + ], + "currency_name": "Rwanda Franc", + "currency": "RWF", "currency_fraction_units": 100, - "currency_symbol": "$" + "currency_symbol": "Fr", + "number_format": "####" }, "Slovakia": { "timezones": [ @@ -531,6 +660,7 @@ ], "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u20ac" }, "Somalia": { @@ -541,7 +671,8 @@ "currency_name": "Somali Shilling", "currency": "SOS", "currency_fraction_units": 100, - "currency_symbol": "Sh" + "currency_symbol": "Sh", + "number_format": "######" }, "Peru": { "currency_fraction": "C\u00e9ntimo", @@ -551,17 +682,19 @@ "currency_name": "Nuevo Sol", "currency": "PEN", "currency_fraction_units": 100, - "currency_symbol": "S/." + "currency_symbol": "S/.", + "number_format": "#,###.##" }, - "Swaziland": { - "currency_fraction": "Cent", + "Vanuatu": { + "currency_fraction": "None", "timezones": [ - "Africa/Mbabane" + "Pacific/Efate" ], - "currency_name": "Lilangeni", - "currency": "SZL", - "currency_fraction_units": 100, - "currency_symbol": "L" + "currency_name": "Vatu", + "currency": "VUV", + "currency_fraction_units": 0, + "currency_symbol": "Vt", + "number_format": "#,###" }, "Nauru": { "timezones": [ @@ -569,18 +702,9 @@ ], "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "$" }, - "Seychelles": { - "currency_fraction": "Cent", - "timezones": [ - "Indian/Mahe" - ], - "currency_name": "Seychelles Rupee", - "currency": "SCR", - "currency_fraction_units": 100, - "currency_symbol": "\u20a8" - }, "Norway": { "currency_fraction": "\u00d8re", "timezones": [ @@ -589,7 +713,8 @@ "currency_name": "Norwegian Krone", "currency": "NOK", "currency_fraction_units": 100, - "currency_symbol": "kr" + "currency_symbol": "kr", + "number_format": "#.###,##" }, "Malawi": { "currency_fraction": "Tambala", @@ -599,11 +724,13 @@ "currency_name": "Kwacha", "currency": "MWK", "currency_fraction_units": 100, - "currency_symbol": "MK" + "currency_symbol": "MK", + "number_format": "######" }, "Cook Islands": { "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "$" }, "Benin": { @@ -612,9 +739,20 @@ ], "currency_fraction": "Centime", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "Fr" }, - "Western Sahara": {}, + "Libya": { + "currency_fraction": "Dirham", + "timezones": [ + "Africa/Tripoli" + ], + "currency_name": "Libyan Dinar", + "currency": "LYD", + "currency_fraction_units": 1000, + "currency_symbol": "\u0644.\u062f", + "number_format": "#######" + }, "Cuba": { "currency_fraction": "Centavo", "timezones": [ @@ -623,41 +761,66 @@ "currency_name": "Cuban Peso", "currency": "CUP", "currency_fraction_units": 100, - "currency_symbol": "$" + "currency_symbol": "$", + "number_format": "#,###.##" }, - "Iran, Islamic Republic of": { - "currency_name": "Iranian Rial", - "currency": "IRR" + "Montenegro": { + "timezones": [ + "Europe/Podgorica" + ], + "currency_fraction": "Cent", + "currency_fraction_units": 100, + "number_format": "#,###.##", + "currency_symbol": "\u20ac" }, - "Falkland Islands (Malvinas)": { - "currency_name": "Falkland Islands Pound", - "currency": "FKP" + "Djibouti": { + "currency_fraction": "Centime", + "timezones": [ + "Africa/Djibouti" + ], + "currency_name": "Djibouti Franc", + "currency": "DJF", + "currency_fraction_units": 100, + "currency_symbol": "Fr", + "number_format": "####" + }, + "Togo": { + "timezones": [ + "Africa/Lome" + ], + "currency_fraction": "Centime", + "currency_fraction_units": 100, + "number_format": "#,###.##", + "currency_symbol": "Fr" + }, + "Heard Island and McDonald Islands": { + "number_format": "#,###.##" }, - "Mayotte": {}, - "Heard Island and McDonald Islands": {}, "China": { "currency_name": "Yuan Renminbi", "currency": "CNY", + "date_format": "yyyy-mm-dd", + "number_format": "#,###.##", "timezones": [ "Asia/Shanghai", "Asia/Harbin", "Asia/Chongqing", "Asia/Urumqi", "Asia/Kashgar" - ], - "date_format": "yyyy-mm-dd" + ] }, - "Armenia": { - "currency_fraction": "Luma", + "Micronesia, Federated States of": { + "number_format": "#,###.##" + }, + "Antigua and Barbuda": { "timezones": [ - "Asia/Yerevan" + "America/Antigua" ], - "currency_name": "Armenian Dram", - "currency": "AMD", + "currency_fraction": "Cent", "currency_fraction_units": 100, - "currency_symbol": "\u058f" + "number_format": "#,###.##", + "currency_symbol": "$" }, - "Timor-Leste": {}, "Dominican Republic": { "currency_fraction": "Centavo", "timezones": [ @@ -666,7 +829,8 @@ "currency_name": "Dominican Peso", "currency": "DOP", "currency_fraction_units": 100, - "currency_symbol": "$" + "currency_symbol": "$", + "number_format": "#,###.##" }, "Ukraine": { "timezones": [ @@ -677,6 +841,7 @@ ], "currency_fraction": "Kopiyka", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u20b4" }, "Bahrain": { @@ -687,7 +852,8 @@ "currency_name": "Bahraini Dinar", "currency": "BHD", "currency_fraction_units": 1000, - "currency_symbol": ".\u062f.\u0628" + "currency_symbol": ".\u062f.\u0628", + "number_format": "#,###.###" }, "Tonga": { "currency_fraction": "Seniti[L]", @@ -697,32 +863,28 @@ "currency_name": "Pa'anga", "currency": "TOP", "currency_fraction_units": 100, - "currency_symbol": "T$" + "currency_symbol": "T$", + "number_format": "#,###.##" }, - "Finland": { - "timezones": [ - "Europe/Helsinki" - ], + "Cayman Islands": { "currency_fraction": "Cent", + "currency_name": "Cayman Islands Dollar", + "currency": "KYD", "currency_fraction_units": 100, - "currency_symbol": "\u20ac" + "currency_symbol": "$", + "number_format": "#,###.##" }, - "Libya": { - "currency_fraction": "Dirham", + "Western Sahara": { + "number_format": "#,###.##" + }, + "Finland": { "timezones": [ - "Africa/Tripoli" + "Europe/Helsinki" ], - "currency_name": "Libyan Dinar", - "currency": "LYD", - "currency_fraction_units": 1000, - "currency_symbol": "\u0644.\u062f" - }, - "Cayman Islands": { "currency_fraction": "Cent", - "currency_name": "Cayman Islands Dollar", - "currency": "KYD", "currency_fraction_units": 100, - "currency_symbol": "$" + "number_format": "#,###.##", + "currency_symbol": "\u20ac" }, "Central African Republic": { "timezones": [ @@ -730,11 +892,7 @@ ], "currency_fraction": "Centime", "currency_fraction_units": 100, - "currency_symbol": "Fr" - }, - "New Caledonia": { - "currency_fraction": "Centime", - "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "Fr" }, "Mauritius": { @@ -745,15 +903,8 @@ "currency_name": "Mauritius Rupee", "currency": "MUR", "currency_fraction_units": 100, - "currency_symbol": "\u20a8" - }, - "Tajikistan": { - "timezones": [ - "Asia/Dushanbe" - ], - "currency_fraction": "Diram", - "currency_fraction_units": 100, - "currency_symbol": "\u0405\u041c" + "currency_symbol": "\u20a8", + "number_format": "#,###" }, "Liechtenstein": { "timezones": [ @@ -761,27 +912,28 @@ ], "currency_fraction": "Rappen", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "Fr" }, - "Australia": { + "Belarus": { + "timezones": [ + "Europe/Minsk" + ], + "currency_fraction": "Kapyeyka", + "currency_fraction_units": 100, + "number_format": "#,###.##", + "currency_symbol": "Br" + }, + "Guyana": { "currency_fraction": "Cent", "timezones": [ - "Australia/Lord_Howe", - "Australia/Hobart", - "Australia/Currie", - "Australia/Melbourne", - "Australia/Sydney", - "Australia/Broken_Hill", - "Australia/Brisbane", - "Australia/Lindeman", - "Australia/Adelaide", - "Australia/Darwin", - "Australia/Perth" + "America/Guyana" ], - "currency_name": "Australian Dollar", - "currency": "AUD", + "currency_name": "Guyana Dollar", + "currency": "GYD", "currency_fraction_units": 100, - "currency_symbol": "$" + "currency_symbol": "$", + "number_format": "######" }, "Mali": { "timezones": [ @@ -789,17 +941,19 @@ ], "currency_fraction": "Centime", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "Fr" }, - "Sweden": { - "currency_fraction": "\u00d6re", + "Cape Verde": { + "currency_fraction": "Centavo", "timezones": [ - "Europe/Stockholm" + "Atlantic/Cape_Verde" ], - "currency_name": "Swedish Krona", - "currency": "SEK", + "currency_name": "Cape Verde Escudo", + "currency": "CVE", "currency_fraction_units": 100, - "currency_symbol": "kr" + "currency_symbol": "Esc or $", + "number_format": "######" }, "Bulgaria": { "timezones": [ @@ -807,6 +961,7 @@ ], "currency_fraction": "Stotinka", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u043b\u0432" }, "United States": { @@ -842,7 +997,8 @@ "currency_name": "US Dollar", "currency": "USD", "currency_fraction_units": 100, - "currency_symbol": "$" + "currency_symbol": "$", + "number_format": "#,###.##" }, "Romania": { "timezones": [ @@ -850,23 +1006,34 @@ ], "currency_fraction": "Ban", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "L" }, + "Cura\u00e7ao": { + "currency_fraction": "Cent", + "currency_fraction_units": 100, + "number_format": "#,###.##", + "currency_symbol": "\u0192" + }, "Angola": { "timezones": [ "Africa/Luanda" ], "currency_fraction": "C\u00eantimo", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "Kz" }, - "French Southern Territories": {}, + "French Southern Territories": { + "number_format": "#,###.##" + }, "Chad": { "timezones": [ "Africa/Ndjamena" ], "currency_fraction": "Centime", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "Fr" }, "South Africa": { @@ -878,40 +1045,40 @@ "currency_name": "Rand", "currency": "ZAR", "currency_fraction_units": 100, - "currency_symbol": "R" + "currency_symbol": "R", + "number_format": "# ###.##" }, - "Tokelau": {}, - "Cyprus": { - "currency_fraction": "Cent", + "Tokelau": { + "number_format": "#,###.##" + }, + "Tajikistan": { "timezones": [ - "Asia/Nicosia" + "Asia/Dushanbe" ], - "currency_name": "Cyprus Pound", - "currency": "CYP", + "currency_fraction": "Diram", "currency_fraction_units": 100, - "currency_symbol": "\u20ac" + "number_format": "#,###.##", + "currency_symbol": "\u0405\u041c" }, "South Georgia and the South Sandwich Islands": { "currency_fraction": "Penny", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u00a3" }, - "Brunei Darussalam": { - "currency_name": "Brunei Dollar", - "currency": "BND", - "timezones": [ - "Asia/Brunei" - ] - }, - "Qatar": { - "currency_fraction": "Dirham", + "Sweden": { + "currency_fraction": "\u00d6re", "timezones": [ - "Asia/Qatar" + "Europe/Stockholm" ], - "currency_name": "Qatari Rial", - "currency": "QAR", + "currency_name": "Swedish Krona", + "currency": "SEK", "currency_fraction_units": 100, - "currency_symbol": "\u0631.\u0642" + "currency_symbol": "kr", + "number_format": "#.###,##" + }, + "Venezuela, Bolivarian Republic of": { + "number_format": "#,###.##" }, "Malaysia": { "currency_fraction": "Sen", @@ -922,7 +1089,8 @@ "currency_name": "Malaysian Ringgit", "currency": "MYR", "currency_fraction_units": 100, - "currency_symbol": "RM" + "currency_symbol": "RM", + "number_format": "#,###.##" }, "Austria": { "timezones": [ @@ -930,6 +1098,7 @@ ], "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u20ac" }, "Mozambique": { @@ -938,16 +1107,9 @@ ], "currency_fraction": "Centavo", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "MT" }, - "Slovenia": { - "timezones": [ - "Europe/Ljubljana" - ], - "currency_fraction": "Cent", - "currency_fraction_units": 100, - "currency_symbol": "\u20ac" - }, "Uganda": { "currency_fraction": "Cent", "timezones": [ @@ -956,18 +1118,19 @@ "currency_name": "Uganda Shilling", "currency": "UGX", "currency_fraction_units": 100, - "currency_symbol": "Sh" + "currency_symbol": "Sh", + "number_format": "######" }, - "Hungary": { - "date_format": "yyyy-mm-dd", - "currency_fraction": "Fill\u00e9r", + "Japan": { + "currency_fraction": "Sen[G]", "timezones": [ - "Europe/Budapest" + "Asia/Tokyo" ], - "currency_name": "Forint", - "currency": "HUF", + "currency_name": "Yen", + "currency": "JPY", "currency_fraction_units": 100, - "currency_symbol": "Ft" + "currency_symbol": "\u00a5", + "number_format": "#,###" }, "Niger": { "timezones": [ @@ -975,11 +1138,13 @@ ], "currency_fraction": "Centime", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "Fr" }, "Isle of Man": { "currency_fraction": "Penny", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u00a3" }, "Brazil": { @@ -1002,27 +1167,27 @@ ], "currency_fraction": "Centavo", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "R$" }, - "Netherlands": { - "currency_fraction": "Cent", - "currency_fraction_units": 100, - "currency_symbol": "\u20ac" + "Lao Peoples Democratic Republic": { + "currency_name": "Kip", + "currency": "LAK", + "number_format": "######" }, - "Faroe Islands": { - "currency_fraction": "\u00d8re", - "currency_fraction_units": 100, - "currency_symbol": "kr" + "Pitcairn": { + "number_format": "#,###.##" }, - "Guinea": { - "currency_fraction": "Centime", + "Kuwait": { + "currency_fraction": "Fils", "timezones": [ - "Africa/Conakry" + "Asia/Kuwait" ], - "currency_name": "Guinea Franc", - "currency": "GNF", - "currency_fraction_units": 100, - "currency_symbol": "Fr" + "currency_name": "Kuwaiti Dinar", + "currency": "KWD", + "currency_fraction_units": 1000, + "currency_symbol": "\u062f.\u0643", + "number_format": "#,###.###" }, "Panama": { "timezones": [ @@ -1030,27 +1195,24 @@ ], "currency_fraction": "Cent\u00e9simo", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "B/." }, - "Guyana": { - "currency_fraction": "Cent", - "timezones": [ - "America/Guyana" - ], - "currency_name": "Guyana Dollar", - "currency": "GYD", - "currency_fraction_units": 100, - "currency_symbol": "$" + "Korea, Republic of": { + "currency_name": "Won", + "currency": "KRW", + "number_format": "#,###" }, - "Costa Rica": { - "currency_fraction": "C\u00e9ntimo", + "Qatar": { + "currency_fraction": "Dirham", "timezones": [ - "America/Costa_Rica" + "Asia/Qatar" ], - "currency_name": "Costa Rican Colon", - "currency": "CRC", + "currency_name": "Qatari Rial", + "currency": "QAR", "currency_fraction_units": 100, - "currency_symbol": "\u20a1" + "currency_symbol": "\u0631.\u0642", + "number_format": "######" }, "Luxembourg": { "timezones": [ @@ -1058,55 +1220,43 @@ ], "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u20ac" }, - "Cape Verde": { - "currency_fraction": "Centavo", + "Virgin Islands, U.S.": { + "number_format": "#,###.##" + }, + "Andorra": { "timezones": [ - "Atlantic/Cape_Verde" + "Europe/Andorra" ], - "currency_name": "Cape Verde Escudo", - "currency": "CVE", + "currency_fraction": "Cent", "currency_fraction_units": 100, - "currency_symbol": "Esc or $" - }, - "Bahamas": { - "currency_name": "Bahamian Dollar", - "currency": "BSD", - "timezones": [ - "America/Nassau" - ] + "number_format": "#,###.##", + "currency_symbol": "\u20ac" }, "Gibraltar": { "currency_fraction": "Penny", "currency_name": "Gibraltar Pound", "currency": "GIP", "currency_fraction_units": 100, - "currency_symbol": "\u00a3" + "currency_symbol": "\u00a3", + "number_format": "#,###.##" }, "Ireland": { "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u20ac" }, - "Pakistan": { - "currency_fraction": "Paisa", + "Italy": { "timezones": [ - "Asia/Karachi" + "Europe/Rome" ], - "currency_name": "Pakistan Rupee", - "currency": "PKR", - "currency_fraction_units": 100, - "currency_symbol": "\u20a8" - }, - "Palau": { - "date_format": "mm-dd-yyyy", "currency_fraction": "Cent", - "timezones": [ - "Pacific/Palau" - ], "currency_fraction_units": 100, - "currency_symbol": "$" + "number_format": "#,###.##", + "currency_symbol": "\u20ac" }, "Nigeria": { "currency_fraction": "Kobo", @@ -1116,7 +1266,8 @@ "currency_name": "Naira", "currency": "NGN", "currency_fraction_units": 100, - "currency_symbol": "\u20a6" + "currency_symbol": "\u20a6", + "number_format": "######" }, "Ecuador": { "timezones": [ @@ -1125,6 +1276,7 @@ ], "currency_fraction": "Cent[D]", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "$" }, "Czech Republic": { @@ -1135,36 +1287,37 @@ "currency_name": "Czech Koruna", "currency": "CZK", "currency_fraction_units": 100, - "currency_symbol": "K\u010d" + "currency_symbol": "K\u010d", + "number_format": "#.###,##" }, "Macedonia, Republic of": { "currency_fraction": "Deni", "currency_name": "Denar", "currency": "MKD", "currency_fraction_units": 100, - "currency_symbol": "\u0434\u0435\u043d" - }, - "Viet Nam": { - "currency_name": "Dong", - "currency": "VND" + "currency_symbol": "\u0434\u0435\u043d", + "number_format": "#,###.##" }, - "Belarus": { + "Australia": { + "currency_fraction": "Cent", "timezones": [ - "Europe/Minsk" + "Australia/Lord_Howe", + "Australia/Hobart", + "Australia/Currie", + "Australia/Melbourne", + "Australia/Sydney", + "Australia/Broken_Hill", + "Australia/Brisbane", + "Australia/Lindeman", + "Australia/Adelaide", + "Australia/Darwin", + "Australia/Perth" ], - "currency_fraction": "Kapyeyka", + "currency_name": "Australian Dollar", + "currency": "AUD", "currency_fraction_units": 100, - "currency_symbol": "Br" - }, - "Vanuatu": { - "currency_fraction": "None", - "timezones": [ - "Pacific/Efate" - ], - "currency_name": "Vatu", - "currency": "VUV", - "currency_fraction_units": 0, - "currency_symbol": "Vt" + "currency_symbol": "$", + "number_format": "# ###.##" }, "Algeria": { "currency_fraction": "Santeem", @@ -1174,11 +1327,8 @@ "currency_name": "Algerian Dinar", "currency": "DZD", "currency_fraction_units": 100, - "currency_symbol": "\u062f.\u062c" - }, - "Korea, Democratic Peoples Republic of": { - "currency_name": "North Korean Won", - "currency": "KPW" + "currency_symbol": "\u062f.\u062c", + "number_format": "######" }, "El Salvador": { "currency_fraction": "Centavo", @@ -1188,7 +1338,8 @@ "currency_name": "El Salvador Colon", "currency": "SVC", "currency_fraction_units": 100, - "currency_symbol": "\u20a1" + "currency_symbol": "\u20a1", + "number_format": "#,###.##" }, "Tuvalu": { "timezones": [ @@ -1196,9 +1347,15 @@ ], "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "$" }, - "Saint Pierre and Miquelon": {}, + "Saint Pierre and Miquelon": { + "number_format": "#,###.##" + }, + "Holy See (Vatican City State)": { + "number_format": "#,###.##" + }, "Marshall Islands": { "timezones": [ "Pacific/Majuro", @@ -1206,6 +1363,7 @@ ], "currency_fraction": "Cent[D]", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "$" }, "Chile": { @@ -1217,15 +1375,19 @@ "currency_name": "Chilean Peso", "currency": "CLP", "currency_fraction_units": 100, - "currency_symbol": "$" + "currency_symbol": "$", + "number_format": "#.###" + }, + "Puerto Rico": { + "number_format": "#,###.##" }, - "Puerto Rico": {}, "Belgium": { "timezones": [ "Europe/Brussels" ], "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u20ac" }, "Kiribati": { @@ -1236,6 +1398,7 @@ ], "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "$" }, "Haiti": { @@ -1246,7 +1409,8 @@ "currency_name": "Gourde", "currency": "HTG", "currency_fraction_units": 100, - "currency_symbol": "G" + "currency_symbol": "G", + "number_format": "######" }, "Belize": { "date_format": "mm-dd-yyyy", @@ -1257,7 +1421,8 @@ "currency_name": "Belize Dollar", "currency": "BZD", "currency_fraction_units": 100, - "currency_symbol": "$" + "currency_symbol": "$", + "number_format": "#,###.##" }, "Hong Kong": { "currency_fraction": "Cent", @@ -1267,7 +1432,8 @@ "currency_name": "Hong Kong Dollar", "currency": "HKD", "currency_fraction_units": 100, - "currency_symbol": "$" + "currency_symbol": "$", + "number_format": "#,###.##" }, "Sierra Leone": { "currency_fraction": "Cent", @@ -1277,7 +1443,8 @@ "currency_name": "Leone", "currency": "SLL", "currency_fraction_units": 100, - "currency_symbol": "Le" + "currency_symbol": "Le", + "number_format": "######" }, "Georgia": { "timezones": [ @@ -1285,15 +1452,13 @@ ], "currency_fraction": "Tetri", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u10da" }, - "Lao Peoples Democratic Republic": { - "currency_name": "Kip", - "currency": "LAK" - }, "Gambia": { "currency_name": "Dalasi", - "currency": "GMD" + "currency": "GMD", + "number_format": "######" }, "Philippines": { "date_format": "mm-dd-yyyy", @@ -1304,7 +1469,8 @@ "currency_name": "Philippine Peso", "currency": "PHP", "currency_fraction_units": 100, - "currency_symbol": "\u20b1" + "currency_symbol": "\u20b1", + "number_format": "#,###.##" }, "Morocco": { "currency_fraction": "Centime", @@ -1314,7 +1480,8 @@ "currency_name": "Moroccan Dirham", "currency": "MAD", "currency_fraction_units": 100, - "currency_symbol": "\u062f.\u0645." + "currency_symbol": "\u062f.\u0645.", + "number_format": "######" }, "Croatia": { "currency_fraction": "Lipa", @@ -1324,7 +1491,8 @@ "currency_name": "Croatian Kuna", "currency": "HRK", "currency_fraction_units": 100, - "currency_symbol": "kn" + "currency_symbol": "kn", + "number_format": "#.###,##" }, "Mongolia": { "date_format": "yyyy-mm-dd", @@ -1337,12 +1505,17 @@ "currency_name": "Tugrik", "currency": "MNT", "currency_fraction_units": 100, - "currency_symbol": "\u20ae" + "currency_symbol": "\u20ae", + "number_format": "######" }, - "Guernsey": { - "currency_fraction": "Penny", + "Guinea-Bissau": { + "timezones": [ + "Africa/Bissau" + ], + "currency_fraction": "Centime", "currency_fraction_units": 100, - "currency_symbol": "\u00a3" + "number_format": "#,###.##", + "currency_symbol": "Fr" }, "Thailand": { "currency_fraction": "Satang", @@ -1352,17 +1525,19 @@ "currency_name": "Baht", "currency": "THB", "currency_fraction_units": 100, - "currency_symbol": "\u0e3f" + "currency_symbol": "\u0e3f", + "number_format": "#,###.##" }, - "Namibia": { - "currency_fraction": "Cent", + "Switzerland": { + "currency_fraction": "Rappen[K]", "timezones": [ - "Africa/Windhoek" + "Europe/Zurich" ], - "currency_name": "Namibia Dollar", - "currency": "NAD", + "currency_name": "Swiss Franc", + "currency": "CHF", "currency_fraction_units": 100, - "currency_symbol": "$" + "currency_symbol": "Fr", + "number_format": "#'###.##" }, "Grenada": { "timezones": [ @@ -1370,25 +1545,31 @@ ], "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "$" }, "Taiwan, Province of China": { - "date_format": "yyyy-mm-dd" + "date_format": "yyyy-mm-dd", + "number_format": "#,###.##" }, - "\u00c5land Islands": {}, - "Iraq": { - "currency_fraction": "Fils", + "\u00c5land Islands": { + "number_format": "#,###.##" + }, + "Seychelles": { + "currency_fraction": "Cent", "timezones": [ - "Asia/Baghdad" + "Indian/Mahe" ], - "currency_name": "Iraqi Dinar", - "currency": "IQD", - "currency_fraction_units": 1000, - "currency_symbol": "\u0639.\u062f" + "currency_name": "Seychelles Rupee", + "currency": "SCR", + "currency_fraction_units": 100, + "currency_symbol": "\u20a8", + "number_format": "######" }, "Tanzania, United Republic of": { "currency_name": "Tanzanian Shilling", - "currency": "TZS" + "currency": "TZS", + "number_format": "#,###.##" }, "Portugal": { "timezones": [ @@ -1398,6 +1579,7 @@ ], "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u20ac" }, "Estonia": { @@ -1408,7 +1590,8 @@ "currency_name": "Kroon", "currency": "EEK", "currency_fraction_units": 100, - "currency_symbol": "\u20ac" + "currency_symbol": "\u20ac", + "number_format": "#,###.##" }, "Uruguay": { "currency_fraction": "Cent\u00e9simo", @@ -1418,15 +1601,26 @@ "currency_name": "Peso Uruguayo", "currency": "UYU", "currency_fraction_units": 100, - "currency_symbol": "$" + "currency_symbol": "$", + "number_format": "#.###,##" }, - "Equatorial Guinea": { + "Mexico": { + "currency_fraction": "Centavo", "timezones": [ - "Africa/Malabo" + "America/Mexico_City", + "America/Cancun", + "America/Merida", + "America/Monterrey", + "America/Mazatlan", + "America/Chihuahua", + "America/Hermosillo", + "America/Tijuana" ], - "currency_fraction": "Centime", + "currency_name": "Mexican Peso", + "currency": "MXN", "currency_fraction_units": 100, - "currency_symbol": "Fr" + "currency_symbol": "$", + "number_format": "#,###.##" }, "Lebanon": { "currency_fraction": "Piastre", @@ -1436,9 +1630,18 @@ "currency_name": "Lebanese Pound", "currency": "LBP", "currency_fraction_units": 100, - "currency_symbol": "\u0644.\u0644" + "currency_symbol": "\u0644.\u0644", + "number_format": "# ###" + }, + "Faroe Islands": { + "currency_fraction": "\u00d8re", + "currency_fraction_units": 100, + "number_format": "#,###.##", + "currency_symbol": "kr" + }, + "Svalbard and Jan Mayen": { + "number_format": "#,###.##" }, - "Svalbard and Jan Mayen": {}, "Uzbekistan": { "currency_fraction": "Tiyin", "timezones": [ @@ -1448,36 +1651,35 @@ "currency_name": "Uzbekistan Sum", "currency": "UZS", "currency_fraction_units": 100, - "currency_symbol": "\u043b\u0432" - }, - "Tunisia": { - "currency_fraction": "Millime", - "timezones": [ - "Africa/Tunis" - ], - "currency_name": "Tunisian Dinar", - "currency": "TND", - "currency_fraction_units": 1000, - "currency_symbol": "\u062f.\u062a" + "currency_symbol": "\u043b\u0432", + "number_format": "######" }, - "Djibouti": { - "currency_fraction": "Centime", + "Egypt": { + "currency_fraction": "Piastre[F]", "timezones": [ - "Africa/Djibouti" + "Africa/Cairo" ], - "currency_name": "Djibouti Franc", - "currency": "DJF", + "currency_name": "Egyptian Pound", + "currency": "EGP", "currency_fraction_units": 100, - "currency_symbol": "Fr" + "currency_symbol": "\u00a3 or \u062c.\u0645", + "number_format": "#,###.##" }, - "Greenland": {}, - "Antigua and Barbuda": { - "timezones": [ - "America/Antigua" - ], + "Falkland Islands (Malvinas)": { + "currency_name": "Falkland Islands Pound", + "currency": "FKP", + "number_format": "######" + }, + "Bermuda": { "currency_fraction": "Cent", + "currency_name": "Bermudian Dollar", + "currency": "BMD", "currency_fraction_units": 100, - "currency_symbol": "$" + "currency_symbol": "$", + "number_format": "#,###.##" + }, + "Timor-Leste": { + "number_format": "#,###.##" }, "Spain": { "timezones": [ @@ -1487,6 +1689,7 @@ ], "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u20ac" }, "Colombia": { @@ -1497,7 +1700,8 @@ "currency_name": "Colombian Peso", "currency": "COP", "currency_fraction_units": 100, - "currency_symbol": "$" + "currency_symbol": "$", + "number_format": "#.###,##" }, "Burundi": { "currency_fraction": "Centime", @@ -1507,16 +1711,13 @@ "currency_name": "Burundi Franc", "currency": "BIF", "currency_fraction_units": 100, - "currency_symbol": "Fr" + "currency_symbol": "Fr", + "number_format": "####" }, - "Fiji": { - "currency_fraction": "Cent", - "timezones": [ - "Pacific/Fiji" - ], - "currency_name": "Fiji Dollar", - "currency": "FJD", + "Turks and Caicos Islands": { + "currency_fraction": "Cent[D]", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "$" }, "Barbados": { @@ -1527,23 +1728,32 @@ "currency_name": "Barbados Dollar", "currency": "BBD", "currency_fraction_units": 100, - "currency_symbol": "$" + "currency_symbol": "$", + "number_format": "######" }, - "Madagascar": { + "Saint Martin (French part)": { + "number_format": "#,###.##" + }, + "Palau": { + "date_format": "mm-dd-yyyy", + "currency_fraction": "Cent", "timezones": [ - "Indian/Antananarivo" + "Pacific/Palau" ], - "currency_fraction": "Iraimbilanja", - "currency_fraction_units": 5, - "currency_symbol": "Ar" + "currency_fraction_units": 100, + "currency_symbol": "$", + "number_format": "#,###.##" }, - "Italy": { + "Denmark": { + "currency_fraction": "\u00d8re", "timezones": [ - "Europe/Rome" + "Europe/Copenhagen" ], - "currency_fraction": "Cent", + "currency_name": "Danish Krone", + "currency": "DKK", "currency_fraction_units": 100, - "currency_symbol": "\u20ac" + "currency_symbol": "kr", + "number_format": "#.###,##" }, "Bhutan": { "currency_fraction": "Chetrum", @@ -1553,7 +1763,8 @@ "currency_name": "Ngultrum", "currency": "BTN", "currency_fraction_units": 100, - "currency_symbol": "Nu." + "currency_symbol": "Nu.", + "number_format": "######" }, "Sudan": { "timezones": [ @@ -1561,11 +1772,13 @@ ], "currency_fraction": "Piastre", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u00a3" }, "Bolivia, Plurinational State of": { "currency_name": "Boliviano", - "currency": "BOB" + "currency": "BOB", + "number_format": "#,###.##" }, "Nepal": { "currency_fraction": "Paisa", @@ -1575,7 +1788,8 @@ "currency_name": "Nepalese Rupee", "currency": "NPR", "currency_fraction_units": 100, - "currency_symbol": "\u20a8" + "currency_symbol": "\u20a8", + "number_format": "#,###.##" }, "Malta": { "currency_fraction": "Cent", @@ -1585,7 +1799,27 @@ "currency_name": "Maltese Lira", "currency": "MTL", "currency_fraction_units": 100, - "currency_symbol": "\u20ac" + "currency_symbol": "\u20ac", + "number_format": "#,###.##" + }, + "Brunei Darussalam": { + "currency_name": "Brunei Dollar", + "currency": "BND", + "number_format": "#,###.##", + "timezones": [ + "Asia/Brunei" + ] + }, + "Comoros": { + "currency_fraction": "Centime", + "timezones": [ + "Indian/Comoro" + ], + "currency_name": "Comoro Franc", + "currency": "KMF", + "currency_fraction_units": 100, + "currency_symbol": "Fr", + "number_format": "####" }, "Maldives": { "currency_fraction": "Laari", @@ -1595,20 +1829,25 @@ "currency_name": "Rufiyaa", "currency": "MVR", "currency_fraction_units": 100, - "currency_symbol": ".\u0783" + "currency_symbol": ".\u0783", + "number_format": "######" + }, + "Northern Mariana Islands": { + "number_format": "#,###.##" }, - "Northern Mariana Islands": {}, "Suriname": { "timezones": [ "America/Paramaribo" ], "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "$" }, "Anguilla": { "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "$" }, "Israel": { @@ -1619,9 +1858,12 @@ "currency_name": "New Israeli Sheqel", "currency": "ILS", "currency_fraction_units": 100, - "currency_symbol": "\u20aa" + "currency_symbol": "\u20aa", + "number_format": "#,###.##" + }, + "R\u00e9union": { + "number_format": "#,###.##" }, - "R\u00e9union": {}, "Indonesia": { "currency_fraction": "Sen", "timezones": [ @@ -1633,7 +1875,11 @@ "currency_name": "Rupiah", "currency": "IDR", "currency_fraction_units": 100, - "currency_symbol": "Rp" + "currency_symbol": "Rp", + "number_format": "#.###,##" + }, + "Bouvet Island": { + "number_format": "#,###.##" }, "Iceland": { "currency_fraction": "Eyrir", @@ -1643,7 +1889,8 @@ "currency_name": "Iceland Krona", "currency": "ISK", "currency_fraction_units": 100, - "currency_symbol": "kr" + "currency_symbol": "kr", + "number_format": "#.###" }, "Zambia": { "currency_fraction": "Ngwee", @@ -1653,7 +1900,8 @@ "currency_name": "Zambian Kwacha", "currency": "ZMK", "currency_fraction_units": 100, - "currency_symbol": "ZK" + "currency_symbol": "ZK", + "number_format": "######" }, "Senegal": { "timezones": [ @@ -1661,6 +1909,7 @@ ], "currency_fraction": "Centime", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "Fr" }, "Papua New Guinea": { @@ -1671,24 +1920,25 @@ "currency_name": "Kina", "currency": "PGK", "currency_fraction_units": 100, - "currency_symbol": "K" + "currency_symbol": "K", + "number_format": "######" }, - "Saint Kitts and Nevis": { + "Gabon": { "timezones": [ - "America/St_Kitts" + "Africa/Libreville" ], - "currency_fraction": "Cent", + "currency_fraction": "Centime", "currency_fraction_units": 100, - "currency_symbol": "$" + "number_format": "#,###.##", + "currency_symbol": "Fr" }, - "Trinidad and Tobago": { - "currency_fraction": "Cent", + "Saint Kitts and Nevis": { "timezones": [ - "America/Port_of_Spain" + "America/St_Kitts" ], - "currency_name": "Trinidad and Tobago Dollar", - "currency": "TTD", + "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "$" }, "Zimbabwe": { @@ -1699,25 +1949,22 @@ "currency_name": "Zimbabwe Dollar", "currency": "ZWD", "currency_fraction_units": 100, - "currency_symbol": "P" + "currency_symbol": "P", + "number_format": "# ###.##" }, - "Germany": { + "Jordan": { + "currency_fraction": "Piastre[H]", "timezones": [ - "Europe/Berlin" + "Asia/Amman" ], - "currency_fraction": "Cent", + "currency_name": "Jordanian Dinar", + "currency": "JOD", "currency_fraction_units": 100, - "currency_symbol": "\u20ac" + "currency_symbol": "\u062f.\u0627", + "number_format": "#,###.###" }, - "Denmark": { - "currency_fraction": "\u00d8re", - "timezones": [ - "Europe/Copenhagen" - ], - "currency_name": "Danish Krone", - "currency": "DKK", - "currency_fraction_units": 100, - "currency_symbol": "kr" + "Martinique": { + "number_format": "#,###.##" }, "Kazakhstan": { "currency_fraction": "T\u00ef\u0131n", @@ -1731,7 +1978,8 @@ "currency_name": "Tenge", "currency": "KZT", "currency_fraction_units": 100, - "currency_symbol": "\u20b8" + "currency_symbol": "\u20b8", + "number_format": "######" }, "Poland": { "timezones": [ @@ -1739,21 +1987,24 @@ ], "currency_fraction": "Grosz", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "z\u0142" }, "Moldova, Republic of": { "currency_name": "Moldovan Leu", - "currency": "MDL" + "currency": "MDL", + "number_format": "######" }, - "Eritrea": { - "currency_fraction": "Cent", + "Mauritania": { + "currency_fraction": "Khoums", "timezones": [ - "Africa/Asmera" + "Africa/Nouakchott" ], - "currency_name": "Nakfa", - "currency": "ERN", - "currency_fraction_units": 100, - "currency_symbol": "Nfk" + "currency_name": "Ouguiya", + "currency": "MRO", + "currency_fraction_units": 5, + "currency_symbol": "UM", + "number_format": "######" }, "Kyrgyzstan": { "currency_fraction": "Tyiyn", @@ -1763,42 +2014,51 @@ "currency_name": "Som", "currency": "KGS", "currency_fraction_units": 100, - "currency_symbol": "\u043b\u0432" + "currency_symbol": "\u043b\u0432", + "number_format": "######" }, - "Congo, The Democratic Republic of the": {}, - "Saint Barth\u00e9lemy": {}, - "British Indian Ocean Territory": { - "currency_fraction": "Cent[D]", - "currency_fraction_units": 100, - "currency_symbol": "$" + "Congo, The Democratic Republic of the": { + "number_format": "#,###.##" }, - "Holy See (Vatican City State)": {}, - "Mexico": { - "currency_fraction": "Centavo", + "Saint Barth\u00e9lemy": { + "number_format": "#,###.##" + }, + "Mayotte": { + "number_format": "#,###.##" + }, + "Iraq": { + "currency_fraction": "Fils", "timezones": [ - "America/Mexico_City", - "America/Cancun", - "America/Merida", - "America/Monterrey", - "America/Mazatlan", - "America/Chihuahua", - "America/Hermosillo", - "America/Tijuana" + "Asia/Baghdad" ], - "currency_name": "Mexican Peso", - "currency": "MXN", + "currency_name": "Iraqi Dinar", + "currency": "IQD", + "currency_fraction_units": 1000, + "currency_symbol": "\u0639.\u062f", + "number_format": "#######" + }, + "Montserrat": { + "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "$" }, - "Sri Lanka": { + "New Caledonia": { + "currency_fraction": "Centime", + "currency_fraction_units": 100, + "number_format": "#,###.##", + "currency_symbol": "Fr" + }, + "Trinidad and Tobago": { "currency_fraction": "Cent", "timezones": [ - "Asia/Colombo" + "America/Port_of_Spain" ], - "currency_name": "Sri Lanka Rupee", - "currency": "LKR", + "currency_name": "Trinidad and Tobago Dollar", + "currency": "TTD", "currency_fraction_units": 100, - "currency_symbol": "Rs" + "currency_symbol": "$", + "number_format": "######" }, "Latvia": { "currency_fraction": "Sant\u012bms", @@ -1808,23 +2068,29 @@ "currency_name": "Latvian Lats", "currency": "LVL", "currency_fraction_units": 100, - "currency_symbol": "Ls" + "currency_symbol": "Ls", + "number_format": "#,###.##" }, "South Sudan": { "currency_fraction": "Piastre", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u00a3" }, - "Cura\u00e7ao": { - "currency_fraction": "Cent", + "Hungary": { + "date_format": "yyyy-mm-dd", + "currency_fraction": "Fill\u00e9r", + "timezones": [ + "Europe/Budapest" + ], + "currency_name": "Forint", + "currency": "HUF", "currency_fraction_units": 100, - "currency_symbol": "\u0192" + "currency_symbol": "Ft", + "number_format": "#.###" }, - "Guadeloupe": {}, - "Ivory Coast": { - "currency_fraction": "Centime", - "currency_fraction_units": 100, - "currency_symbol": "Fr" + "Guadeloupe": { + "number_format": "#,###.##" }, "Honduras": { "currency_fraction": "Centavo", @@ -1834,25 +2100,36 @@ "currency_name": "Lempira", "currency": "HNL", "currency_fraction_units": 100, - "currency_symbol": "L" + "currency_symbol": "L", + "number_format": "#,###.##" }, "Myanmar": { "currency_name": "Kyat", "currency": "MMK", + "number_format": "######", "timezones": [ "Asia/Rangoon" ] }, - "Bouvet Island": {}, - "Egypt": { - "currency_fraction": "Piastre[F]", + "Equatorial Guinea": { "timezones": [ - "Africa/Cairo" + "Africa/Malabo" ], - "currency_name": "Egyptian Pound", - "currency": "EGP", + "currency_fraction": "Centime", "currency_fraction_units": 100, - "currency_symbol": "\u00a3 or \u062c.\u0645" + "number_format": "#,###.##", + "currency_symbol": "Fr" + }, + "Tunisia": { + "currency_fraction": "Millime", + "timezones": [ + "Africa/Tunis" + ], + "currency_name": "Tunisian Dinar", + "currency": "TND", + "currency_fraction_units": 1000, + "currency_symbol": "\u062f.\u062a", + "number_format": "#######" }, "Nicaragua": { "currency_fraction": "Centavo", @@ -1862,7 +2139,8 @@ "currency_name": "Cordoba Oro", "currency": "NIO", "currency_fraction_units": 100, - "currency_symbol": "C$" + "currency_symbol": "C$", + "number_format": "######" }, "Singapore": { "currency_fraction": "Sen", @@ -1872,7 +2150,8 @@ "currency_name": "Singapore Dollar", "currency": "SGD", "currency_fraction_units": 100, - "currency_symbol": "$" + "currency_symbol": "$", + "number_format": "#,###.##" }, "Serbia": { "timezones": [ @@ -1880,17 +2159,11 @@ ], "currency_fraction": "Para", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u0434\u0438\u043d. or din." }, - "Botswana": { - "currency_fraction": "Thebe", - "timezones": [ - "Africa/Gaborone" - ], - "currency_name": "Pula", - "currency": "BWP", - "currency_fraction_units": 100, - "currency_symbol": "P" + "Palestinian Territory, Occupied": { + "number_format": "#,###.##" }, "United Kingdom": { "currency_fraction": "Penny", @@ -1900,46 +2173,58 @@ "currency_name": "Pound Sterling", "currency": "GBP", "currency_fraction_units": 100, - "currency_symbol": "\u00a3" + "currency_symbol": "\u00a3", + "number_format": "#,###.##" + }, + "Antarctica": { + "number_format": "#,###.##" + }, + "Congo": { + "number_format": "#,###.##" + }, + "Sint Maarten (Dutch part)": { + "number_format": "#,###.##" }, - "Antarctica": {}, - "Congo": {}, - "Sint Maarten (Dutch part)": {}, "Greece": { "timezones": [ "Europe/Athens" ], "currency_fraction": "Cent", "currency_fraction_units": 100, + "number_format": "#,###.##", "currency_symbol": "\u20ac" }, - "Paraguay": { - "currency_fraction": "C\u00e9ntimo", + "Sri Lanka": { + "currency_fraction": "Cent", "timezones": [ - "America/Asuncion" + "Asia/Colombo" ], - "currency_name": "Guarani", - "currency": "PYG", + "currency_name": "Sri Lanka Rupee", + "currency": "LKR", "currency_fraction_units": 100, - "currency_symbol": "\u20b2" + "currency_symbol": "Rs", + "number_format": "######" }, - "Gabon": { + "Namibia": { + "currency_fraction": "Cent", "timezones": [ - "Africa/Libreville" + "Africa/Windhoek" ], - "currency_fraction": "Centime", + "currency_name": "Namibia Dollar", + "currency": "NAD", "currency_fraction_units": 100, - "currency_symbol": "Fr" + "currency_symbol": "$", + "number_format": "######" }, - "Palestinian Territory, Occupied": {}, - "Comoros": { - "currency_fraction": "Centime", + "Botswana": { + "currency_fraction": "Thebe", "timezones": [ - "Indian/Comoro" + "Africa/Gaborone" ], - "currency_name": "Comoro Franc", - "currency": "KMF", + "currency_name": "Pula", + "currency": "BWP", "currency_fraction_units": 100, - "currency_symbol": "Fr" + "currency_symbol": "P", + "number_format": "#,###.##" } } \ No newline at end of file diff --git a/webnotes/country_info.py b/webnotes/country_info.py index 2cf66b16ef..b199ccf03b 100644 --- a/webnotes/country_info.py +++ b/webnotes/country_info.py @@ -17,4 +17,18 @@ def get_all(): all_data = json.loads(local_info.read()) return all_data +def update(): + with open(os.path.join(os.path.dirname(__file__), "currency_info.json"), "r") as nformats: + nformats = json.loads(nformats.read()) + + all_data = get_all() + for country in all_data: + data = all_data[country] + data["number_format"] = nformats.get(data.get("currency", "default"), + nformats.get("default"))["display"] + + print all_data + + with open(os.path.join(os.path.dirname(__file__), "country_info.json"), "w") as local_info: + local_info.write(json.dumps(all_data, indent=1)) diff --git a/webnotes/db.py b/webnotes/db.py index dd5d080322..8774afd572 100644 --- a/webnotes/db.py +++ b/webnotes/db.py @@ -339,11 +339,18 @@ class Database: return self.get_default(key, parent) else: res = self.sql("""select defkey, defvalue from `tabDefaultValue` - where parent = %s""", parent) - d = {} - for rec in res: - d[rec[0]] = rec[1] or '' - return d + where parent = %s""", parent, as_dict=1) + defaults = webnotes._dict({}) + for d in res: + if d.defkey in defaults: + # listify + if isinstance(defaults[d.defkey], basestring): + defaults[d.defkey] = [defaults[d.defkey]] + defaults[d.defkey].append(d.defvalue) + else: + defaults[d.defkey] = d.defvalue + + return defaults def begin(self): if not self.in_transaction: diff --git a/webnotes/model/doctype.py b/webnotes/model/doctype.py index 1f9dc9db55..e29604dc13 100644 --- a/webnotes/model/doctype.py +++ b/webnotes/model/doctype.py @@ -46,7 +46,10 @@ def get(doctype, processed=False, cached=True): """return doclist""" if cached: doclist = from_cache(doctype, processed) - if doclist: return DocTypeDocList(doclist) + if doclist: + if processed: + add_linked_with(doclist) + return DocTypeDocList(doclist) load_docfield_types() @@ -65,7 +68,6 @@ def get(doctype, processed=False, cached=True): expand_selects(doclist) add_print_formats(doclist) add_search_fields(doclist) - add_linked_with(doclist) add_workflows(doclist) update_language(doclist) @@ -76,6 +78,9 @@ def get(doctype, processed=False, cached=True): add_precision(doctype, doclist) to_cache(doctype, processed, doclist) + + if processed: + add_linked_with(doclist) return DocTypeDocList(doclist)