(parse): Negate QIF amounts for which a category is specified, since

the category shows where the money went, not where it came from.
This commit is contained in:
John Wiegley 2005-06-28 21:12:08 +00:00
parent 6de82df3ae
commit 609f6b195a

2
qif.cc
View file

@ -165,6 +165,8 @@ unsigned int qif_parser_t::parse(std::istream& in,
line[len - 1] = '\0';
xact->account = journal->find_account(line[0] == '[' ?
line + 1 : line);
// Negate the amount, to show the correct direction of flow
xact->amount.negate();
break;
}