(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:
parent
6de82df3ae
commit
609f6b195a
1 changed files with 2 additions and 0 deletions
2
qif.cc
2
qif.cc
|
|
@ -165,6 +165,8 @@ unsigned int qif_parser_t::parse(std::istream& in,
|
||||||
line[len - 1] = '\0';
|
line[len - 1] = '\0';
|
||||||
xact->account = journal->find_account(line[0] == '[' ?
|
xact->account = journal->find_account(line[0] == '[' ?
|
||||||
line + 1 : line);
|
line + 1 : line);
|
||||||
|
// Negate the amount, to show the correct direction of flow
|
||||||
|
xact->amount.negate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue