From 1fd4387b678782f2ed90484d36f8980b64d58aa3 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 18 Jun 2009 01:48:01 +0100 Subject: Restored pricesdb command and --pricesdb-format option --- src/iterators.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/iterators.cc') diff --git a/src/iterators.cc b/src/iterators.cc index 9b07ace3..63cbb9b2 100644 --- a/src/iterators.cc +++ b/src/iterators.cc @@ -101,7 +101,7 @@ void posts_commodities_iterator::reset(journal_t& journal) foreach (commodity_t::base_t::history_map::value_type hpair, pair.second.prices) { xact_t * xact; - string symbol = hpair.second.commodity().symbol(); + string symbol = hpair.second.commodity().symbol(); std::map::iterator i = xacts_by_commodity.find(symbol); @@ -123,6 +123,8 @@ void posts_commodities_iterator::reset(journal_t& journal) temp.amount = hpair.second; temp.set_flags(ITEM_GENERATED | ITEM_TEMP); + temp.xdata().datetime = hpair.first; + xact->add_post(&temp); } } -- cgit v1.2.3