diff options
author | John Wiegley <johnw@newartisans.com> | 2009-01-19 22:25:12 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-01-19 22:25:12 -0400 |
commit | 5c17da657283ab074cd5d3d45833f6afbaf9ed2d (patch) | |
tree | f2af9a3a7ab7d62572b930c609ec1d5df7981b1b | |
parent | d9197fc2e5e5283d114ef9a1821d200b56529428 (diff) | |
download | fork-ledger-5c17da657283ab074cd5d3d45833f6afbaf9ed2d.tar.gz fork-ledger-5c17da657283ab074cd5d3d45833f6afbaf9ed2d.tar.bz2 fork-ledger-5c17da657283ab074cd5d3d45833f6afbaf9ed2d.zip |
Instead of doing price annotations in the textual parser, use
commodity_t::exchange.
-rw-r--r-- | src/textual.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/textual.cc b/src/textual.cc index ce1db3a3..7dd8c3d6 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -284,9 +284,8 @@ xact_t * parse_xact(char * line, account_t * account, entry_t * entry = NULL) else per_unit_cost /= xact->amount; - if (xact->amount.commodity() && - ! xact->amount.commodity().annotated) - xact->amount.annotate(annotation_t(per_unit_cost)); + commodity_t::exchange(xact->amount.commodity(), + per_unit_cost, datetime_t(*xact->date())); DEBUG("textual.parse", "line " << linenum << ": " << "Total cost is " << *xact->cost); |