summaryrefslogtreecommitdiff
path: root/main.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2005-02-09 11:50:31 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:40:56 -0400
commit4ca26fbd73e2619d7de75363b294163a16832982 (patch)
tree7244d63f3051ee3ecd1060c57d4f04c9dc8c8fe8 /main.cc
parent8f373c049cf0e00508551539cd498fcfce6abc94 (diff)
downloadfork-ledger-4ca26fbd73e2619d7de75363b294163a16832982.tar.gz
fork-ledger-4ca26fbd73e2619d7de75363b294163a16832982.tar.bz2
fork-ledger-4ca26fbd73e2619d7de75363b294163a16832982.zip
*** empty log message ***
Diffstat (limited to 'main.cc')
-rw-r--r--main.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/main.cc b/main.cc
index f01b60b1..c2ff8694 100644
--- a/main.cc
+++ b/main.cc
@@ -374,8 +374,15 @@ def vmax(d, val):\n\
walk_transactions(new_entry->transactions, *formatter);
else if (command == "P" || command == "D")
walk_commodities(commodity_t::commodities, *formatter);
- else if (command == "R")
- reconcile_account(*journal, *journal->master, value_t(long(0)));
+ else if (command == "R") {
+ account_t * account = journal->find_account_re(*arg);
+ if (! account)
+ throw error(std::string("Could not find account matching '") +
+ *arg + "'");
+ reconcile_results_t results = reconcile_account(*journal, *account,
+ value_t(*++arg));
+ walk_transactions(results.pending_xacts, *formatter);
+ }
else if (command == "w")
write_textual_journal(*journal, *arg, *formatter, *out);
else