summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2005-06-28 21:12:08 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:41:13 -0400
commit609f6b195af708b285323b4dcdac7e603da912bf (patch)
tree56835c4cb2a7d30234a03d086c82e3fb2334eff6
parent6de82df3ae45894b173786a144332ec50705f359 (diff)
downloadfork-ledger-609f6b195af708b285323b4dcdac7e603da912bf.tar.gz
fork-ledger-609f6b195af708b285323b4dcdac7e603da912bf.tar.bz2
fork-ledger-609f6b195af708b285323b4dcdac7e603da912bf.zip
(parse): Negate QIF amounts for which a category is specified, since
the category shows where the money went, not where it came from.
-rw-r--r--qif.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/qif.cc b/qif.cc
index a29f4bc1..8ca966d4 100644
--- a/qif.cc
+++ b/qif.cc
@@ -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;
}