diff options
author | John Wiegley <johnw@newartisans.com> | 2008-07-31 05:05:24 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-07-31 05:05:24 -0400 |
commit | 8afd926a27af55862ce360970e05d747f249a0da (patch) | |
tree | 3d93c3bedca21da06681bf9868fa3b94ac5050af /textual.cc | |
parent | 8276b51f5692796bfdf75dd64f709e0de1c7caaf (diff) | |
download | ledger-8afd926a27af55862ce360970e05d747f249a0da.tar.gz ledger-8afd926a27af55862ce360970e05d747f249a0da.tar.bz2 ledger-8afd926a27af55862ce360970e05d747f249a0da.zip |
Cleaned up some method names and documentation relating to values.
Diffstat (limited to 'textual.cc')
-rw-r--r-- | textual.cc | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -251,12 +251,14 @@ xact_t * parse_xact(char * line, account_t * account, per_unit_cost /= xact->amount; if (xact->amount.commodity() && - ! xact->amount.commodity().annotated) - xact->amount.annotate_commodity - (annotation_t - (per_unit_cost, - xact->entry ? optional<datetime_t>(xact->entry->actual_date()) : none, - xact->entry ? optional<string>(xact->entry->code) : none)); + ! xact->amount.commodity().annotated) { + if (xact->entry) + xact->amount.annotate(annotation_t(per_unit_cost, + xact->entry->actual_date(), + xact->entry->code)); + else + xact->amount.annotate(annotation_t(per_unit_cost)); + } DEBUG("ledger.textual.parse", "line " << linenum << ": " << "Total cost is " << *xact->cost); |