Instead of doing price annotations in the textual parser, use
commodity_t::exchange.
This commit is contained in:
parent
d9197fc2e5
commit
5c17da6572
1 changed files with 2 additions and 3 deletions
|
|
@ -284,9 +284,8 @@ xact_t * parse_xact(char * line, account_t * account, entry_t * entry = NULL)
|
||||||
else
|
else
|
||||||
per_unit_cost /= xact->amount;
|
per_unit_cost /= xact->amount;
|
||||||
|
|
||||||
if (xact->amount.commodity() &&
|
commodity_t::exchange(xact->amount.commodity(),
|
||||||
! xact->amount.commodity().annotated)
|
per_unit_cost, datetime_t(*xact->date()));
|
||||||
xact->amount.annotate(annotation_t(per_unit_cost));
|
|
||||||
|
|
||||||
DEBUG("textual.parse", "line " << linenum << ": " <<
|
DEBUG("textual.parse", "line " << linenum << ": " <<
|
||||||
"Total cost is " << *xact->cost);
|
"Total cost is " << *xact->cost);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue