From cc7f3ec664808ea0f091e0017474cd1a5db29823 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 17 Sep 2008 05:13:42 -0400 Subject: [PATCH] Do not adjust display precision when parsing a pricing entry. Fixes: 7E5D2A6C-A15F-4BC8-A851-04A48E3E30F4 --- TODO | 17 +++++++++-------- textual.cc | 3 ++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/TODO b/TODO index 57d4a046..68993ae0 100644 --- a/TODO +++ b/TODO @@ -6,14 +6,6 @@ LEDGER -*- mode: org; fill-column: 78 -*- #+TAGS: EMACS(e) FEATURE(f) DOCS(d) WEBSITE(w) BUILD(b) #+CATEGORY: Ledger -* TODO [#B] Do not adjust display precision when parsing a pricing entry - :PROPERTIES: - :Submitter: John Wiegley - :Version: 2.6.0.90 - :Ticket: 206 - :ID: 7E5D2A6C-A15F-4BC8-A851-04A48E3E30F4 - :END: - [2008-07-28 Mon] * DONE [#B] -e doesn't seem to work for providing an end date - State "DONE" [2008-04-04 Fri 14:34] \\ There was a problem with the -e date parsing. I now interpret "-e june" @@ -284,6 +276,15 @@ ledger -f my.ledger -b 2008/03/01 -e 2008/04/01 print :ID: A95B2E0F-095D-4314-BC4D-3CEC42203FB1 :END: [2008-04-06 Sun] +* DONE [#B] Do not adjust display precision when parsing a pricing entry + - State "DONE" [2008-09-17 Wed 05:12] + :PROPERTIES: + :Submitter: John Wiegley + :Version: 2.6.0.90 + :Ticket: 206 + :ID: 7E5D2A6C-A15F-4BC8-A851-04A48E3E30F4 + :END: + [2008-07-28 Mon] * DONE [#C] Entry command doesn't match debit account when description is unmatched - State "DONE" [2008-07-20 Sun 20:32] I think I've isolated a bug with the entry command where I get "Equity" diff --git a/textual.cc b/textual.cc index d711005b..2033106b 100644 --- a/textual.cc +++ b/textual.cc @@ -732,7 +732,8 @@ unsigned int textual_parser_t::parse(std::istream& in, std::string symbol; parse_symbol(symbol_and_price, symbol); - amount_t price(symbol_and_price); + amount_t price; + price.parse(symbol_and_price, AMOUNT_PARSE_NO_MIGRATE); if (commodity_t * commodity = commodity_t::find_or_create(symbol)) commodity->add_price(datetime, price);