diff options
Diffstat (limited to 'src/textual.cc')
-rw-r--r-- | src/textual.cc | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/textual.cc b/src/textual.cc index b3fb2f2e..dec2dc3a 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -492,7 +492,7 @@ void instance_t::price_entry_directive(char * line) if (commodity_t * commodity = amount_t::current_pool->find_or_create(symbol)) { - commodity->add_price(datetime, price); + commodity->add_price(datetime, price, true); commodity->add_flags(COMMODITY_KNOWN); } else { assert(false); @@ -895,20 +895,12 @@ xact_t * instance_t::parse_xact(char * line, if (xact->cost->sign() < 0) throw parse_error("A transaction's cost may not be negative"); - amount_t per_unit_cost(*xact->cost); if (per_unit) *xact->cost *= xact->amount; - else - per_unit_cost /= xact->amount; - - commodity_t::exchange(xact->amount.commodity(), - per_unit_cost, datetime_t(xact->date())); DEBUG("textual.parse", "line " << linenum << ": " << "Total cost is " << *xact->cost); DEBUG("textual.parse", "line " << linenum << ": " - << "Per-unit cost is " << per_unit_cost); - DEBUG("textual.parse", "line " << linenum << ": " << "Annotated amount is " << xact->amount); if (cstream.eof()) |