summaryrefslogtreecommitdiff
path: root/main.cc
diff options
context:
space:
mode:
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