slanack: The problem was that <split:quantity> received the `transaction

commodity' instead of the correct `account commodity'.  There should really be
a check if the account commodity has been defined.
This commit is contained in:
John Wiegley 2008-07-17 21:26:41 -04:00
parent 30fb235841
commit b2258cedd1

View file

@ -162,13 +162,9 @@ static void endElement(void *userData, const char *name)
// the transaction is worth. // the transaction is worth.
amount_t value; amount_t value;
commodity_t * default_commodity = NULL; commodity_t * default_commodity = NULL;
if (entry_comm) { account_comm_map::iterator ac = account_comms.find(xact->account);
default_commodity = entry_comm; if (ac != account_comms.end())
} else { default_commodity = (*ac).second;
account_comm_map::iterator ac = account_comms.find(xact->account);
if (ac != account_comms.end())
default_commodity = (*ac).second;
}
if (default_commodity) { if (default_commodity) {
curr_quant.set_commodity(*default_commodity); curr_quant.set_commodity(*default_commodity);