mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Correct ISO code for the Polish currency.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8458 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2003-05-29 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/engine/iso-4217-currencies.scm: Update the Polish Zloty for
|
||||
its new ISO currency code.
|
||||
|
||||
* src/engine/gnc-commodity.c: Convert from the old Zloty code to
|
||||
the new one.
|
||||
|
||||
2003-05-30 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/report/standard-reports/category-barchart.scm: Re-enable
|
||||
|
||||
@@ -67,6 +67,16 @@ struct gnc_commodity_table_s {
|
||||
|
||||
typedef struct gnc_commodity_namespace_s gnc_commodity_namespace;
|
||||
|
||||
struct gnc_new_iso_code {
|
||||
const char *old_code;
|
||||
const char *new_code;
|
||||
} gnc_new_iso_codes[] = {
|
||||
{"RUB", "RUR"}, // Russian Ruble
|
||||
{"PLZ", "PLN"}, // Polish Zloty
|
||||
};
|
||||
#define GNC_NEW_ISO_CODES \
|
||||
(sizeof(gnc_new_iso_codes) / sizeof(struct gnc_new_iso_code))
|
||||
|
||||
/********************************************************************
|
||||
* gnc_commodity_new
|
||||
********************************************************************/
|
||||
@@ -549,8 +559,10 @@ gnc_commodity_table_get_size(gnc_commodity_table* tbl)
|
||||
|
||||
gnc_commodity *
|
||||
gnc_commodity_table_lookup(const gnc_commodity_table * table,
|
||||
const char * namespace, const char * mnemonic) {
|
||||
const char * namespace, const char * mnemonic)
|
||||
{
|
||||
gnc_commodity_namespace * nsp = NULL;
|
||||
int i;
|
||||
|
||||
if (!table || !namespace || !mnemonic) return NULL;
|
||||
|
||||
@@ -558,11 +570,15 @@ gnc_commodity_table_lookup(const gnc_commodity_table * table,
|
||||
|
||||
if(nsp) {
|
||||
/*
|
||||
* The symbol for Russing Roubles was changed. Need to support the
|
||||
* old symbol to be backward compatible.
|
||||
* Backward compatability support for currencies that have
|
||||
* recently changed.
|
||||
*/
|
||||
if (strcmp(mnemonic, "RUB") == 0)
|
||||
mnemonic = "RUR";
|
||||
for (i = 0; i < GNC_NEW_ISO_CODES; i++) {
|
||||
if (strcmp(mnemonic, gnc_new_iso_codes[i].old_code) == 0) {
|
||||
mnemonic = gnc_new_iso_codes[i].new_code;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return g_hash_table_lookup(nsp->table, (gpointer)mnemonic);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
( "Paraguay Guarani" "guarani" "centimo" "ISO4217" "PYG" "600" 100 100 )
|
||||
( "Peruvian Nuevo Sol" "nuevo sol" "centimo" "ISO4217" "PEN" "604" 100 100 )
|
||||
( "Philippine Peso" "peso" "centavo" "ISO4217" "PHP" "608" 100 100 )
|
||||
( "Polish Zloty" "zloty" "groszy" "ISO4217" "PLZ" "616" 100 100 )
|
||||
( "Polish Zloty" "zloty" "groszy" "ISO4217" "PLN" "985" 100 100 )
|
||||
( "Portuguese Escudo" "escudo" "centavo" "ISO4217" "PTE" "620" 100 100 ) ;; through 1998
|
||||
( "Qatari Rial" "rial" "dirham" "ISO4217" "QAR" "634" 100 100 )
|
||||
( "Romanian Leu" "leu" "bani" "ISO4217" "ROL" "642" 100 100 )
|
||||
|
||||
Reference in New Issue
Block a user