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
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue