From 93f884b5f2159bdf6c9b924fc5436a65cd37fc54 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 14 Jan 2009 00:32:02 -0400 Subject: The cleared or pending flag of a transaction overrides the flag for the entire entry only if it is "more" cleared. --- src/textual.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/textual.cc') diff --git a/src/textual.cc b/src/textual.cc index eef2cc27..61cfd09a 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -552,7 +552,9 @@ entry_t * parse_entry(std::istream& in, char * line, account_t * master, } if (xact_t * xact = parse_xact(line, master, curr.get())) { - xact->set_state(state); + if ((state == item_t::CLEARED && xact->state() != item_t::CLEARED) || + (state == item_t::PENDING && xact->state() == item_t::UNCLEARED)) + xact->set_state(state); xact->beg_pos = beg_pos; xact->beg_line = beg_line; -- cgit v1.2.3