summaryrefslogtreecommitdiff
path: root/ofx.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ofx.cc')
-rw-r--r--ofx.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/ofx.cc b/ofx.cc
index 31ea699e..8b53b284 100644
--- a/ofx.cc
+++ b/ofx.cc
@@ -37,7 +37,7 @@ int ofx_proc_account_cb(struct OfxAccountData data, void * account_data)
ofx_accounts.insert(accounts_pair(data.account_id, account));
if (data.currency_valid) {
- commodity_t * commodity = commodity_t::find_commodity(data.currency, true);
+ commodity_t * commodity = commodity_t::find_or_create(data.currency);
commodity->add_flags(COMMODITY_STYLE_SUFFIXED | COMMODITY_STYLE_SEPARATED);
commodities_map::iterator i = ofx_account_currencies.find(data.account_id);
@@ -77,7 +77,7 @@ int ofx_proc_transaction_cb(struct OfxTransactionData data,
if (data.unique_id_valid) {
commodities_map::iterator s = ofx_securities.find(data.unique_id);
assert(s != ofx_securities.end());
- xact->amount = stream.str() + " " + (*s).second->symbol;
+ xact->amount = stream.str() + " " + (*s).second->base_symbol();
} else {
xact->amount = stream.str() + " " + default_commodity->base_symbol();
}
@@ -137,7 +137,7 @@ int ofx_proc_security_cb(struct OfxSecurityData data, void * security_data)
else
return -1;
- commodity_t * commodity = commodity_t::find_commodity(symbol, true);
+ commodity_t * commodity = commodity_t::find_or_create(symbol);
commodity->add_flags(COMMODITY_STYLE_SUFFIXED | COMMODITY_STYLE_SEPARATED);
if (data.secname_valid)