Output budget even if no postings directly matched
This commit is contained in:
parent
96b652310c
commit
7b6cc4c365
2 changed files with 2 additions and 4 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue