summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2005-02-09 21:27:39 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:40:57 -0400
commit88042027e7f8fd7618046cdb6baf4be1d1f74bf4 (patch)
tree05d4a1230752b5f6f186c12b5f11694d8b630980
parentbe52e2a9c82f4a2c36250a06e716befa177b5a0f (diff)
downloadfork-ledger-88042027e7f8fd7618046cdb6baf4be1d1f74bf4.tar.gz
fork-ledger-88042027e7f8fd7618046cdb6baf4be1d1f74bf4.tar.bz2
fork-ledger-88042027e7f8fd7618046cdb6baf4be1d1f74bf4.zip
*** empty log message ***
-rw-r--r--main.cc2
-rw-r--r--main.py9
2 files changed, 8 insertions, 3 deletions
diff --git a/main.cc b/main.cc
index 9e0361b3..9cb0effe 100644
--- a/main.cc
+++ b/main.cc
@@ -388,7 +388,7 @@ def vmax(d, val):\n\
else
walk_entries(journal->entries, *formatter);
- if (command != "P")
+ if (command != "P" && command != "D")
formatter->flush();
// If we are generating a reconcile report, determine the final set
diff --git a/main.py b/main.py
index 7b150821..207c6f95 100644
--- a/main.py
+++ b/main.py
@@ -112,6 +112,8 @@ elif command == "equity":
command = "E"
elif command == "prices":
command = "P"
+elif command == "pricesdb":
+ command = "D";
else:
print "Unrecognized command:", command
sys.exit (1)
@@ -190,6 +192,8 @@ elif command == "P":
return max_val
format = config.prices_format
+elif command == "D":
+ format = config.pricesdb_format
else:
format = config.print_format
@@ -437,7 +441,7 @@ if config.comm_as_payee:
if command == "e":
walk_transactions (new_entry, handler)
-elif command == "P":
+elif command == "P" or command == "D":
walk_commodities (handler)
else:
walk_entries (journal, handler)
@@ -445,7 +449,8 @@ else:
# Flush the handlers, causing them to output whatever data is still
# pending.
-handler.flush ()
+if command != "P" and command != "D":
+ handler.flush ()
# For the balance and equity reports, the account totals now need to
# be displayed. This is different from outputting transactions, in