summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-20 20:55:24 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-20 20:55:24 -0400
commit7b6cc4c365758a293f914f7b3b61af78e4313d4a (patch)
tree5b0516b08b622cdb9be042bf8b14910b156e7f36 /src
parent96b652310cf8077926f241a15b853b0676bd3f3c (diff)
downloadfork-ledger-7b6cc4c365758a293f914f7b3b61af78e4313d4a.tar.gz
fork-ledger-7b6cc4c365758a293f914f7b3b61af78e4313d4a.tar.bz2
fork-ledger-7b6cc4c365758a293f914f7b3b61af78e4313d4a.zip
Output budget even if no postings directly matched
Diffstat (limited to 'src')
-rw-r--r--src/filters.cc3
-rw-r--r--src/filters.h3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/filters.cc b/src/filters.cc
index d4fbae06..1dd410d3 100644
--- a/src/filters.cc
+++ b/src/filters.cc
@@ -1233,7 +1233,6 @@ void budget_posts::operator()(post_t& post)
handle:
if (post_in_budget && flags & BUDGET_BUDGETED) {
report_budget_items(post.date());
- count++;
item_handler<post_t>::operator()(post);
}
else if (! post_in_budget && flags & BUDGET_UNBUDGETED) {
@@ -1243,7 +1242,7 @@ void budget_posts::operator()(post_t& post)
void budget_posts::flush()
{
- if (count > 0)
+ if (flags & BUDGET_BUDGETED)
report_budget_items(terminus);
item_handler<post_t>::flush();
diff --git a/src/filters.h b/src/filters.h
index 76648bee..08dd18d5 100644
--- a/src/filters.h
+++ b/src/filters.h
@@ -883,7 +883,6 @@ class budget_posts : public generate_posts
uint_least8_t flags;
date_t terminus;
- std::size_t count;
budget_posts();
@@ -891,7 +890,7 @@ public:
budget_posts(post_handler_ptr handler,
date_t _terminus,
uint_least8_t _flags = BUDGET_BUDGETED)
- : generate_posts(handler), flags(_flags), terminus(_terminus), count(0) {
+ : generate_posts(handler), flags(_flags), terminus(_terminus) {
TRACE_CTOR(budget_posts, "post_handler_ptr, date_t, uint_least8_t");
}
virtual ~budget_posts() throw() {