summaryrefslogtreecommitdiff
path: root/src/filters.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-19 16:07:54 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-19 16:07:59 -0400
commit6770380b6da5061857e0a15539f1b85669d24e62 (patch)
treed04d198e1fa4abf0c4642a5112dbf99c4558e832 /src/filters.h
parentb819475a9346bedf31fd25e67dc2640ff6431141 (diff)
downloadfork-ledger-6770380b6da5061857e0a15539f1b85669d24e62.tar.gz
fork-ledger-6770380b6da5061857e0a15539f1b85669d24e62.tar.bz2
fork-ledger-6770380b6da5061857e0a15539f1b85669d24e62.zip
Subsantial fixes and improvements to budgeting
1. A bounded budget "from DATE to DATE" will now generate entries throughout that entire range, if it is triggered. 2. An unbounded budget begins, as before, in the timeframe of the reported posting which triggered it, but now continues until the present date.
Diffstat (limited to 'src/filters.h')
-rw-r--r--src/filters.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/filters.h b/src/filters.h
index 180253d2..72e8f19f 100644
--- a/src/filters.h
+++ b/src/filters.h
@@ -882,14 +882,17 @@ class budget_posts : public generate_posts
#define BUDGET_WRAP_VALUES 0x04
uint_least8_t flags;
+ date_t terminus;
+ std::size_t count;
budget_posts();
public:
budget_posts(post_handler_ptr handler,
- uint_least8_t _flags = BUDGET_BUDGETED)
- : generate_posts(handler), flags(_flags) {
- TRACE_CTOR(budget_posts, "post_handler_ptr, uint_least8_t");
+ date_t _terminus,
+ uint_least8_t _flags = BUDGET_BUDGETED)
+ : generate_posts(handler), flags(_flags), terminus(_terminus), count(0) {
+ TRACE_CTOR(budget_posts, "post_handler_ptr, date_t, uint_least8_t");
}
virtual ~budget_posts() throw() {
TRACE_DTOR(budget_posts);
@@ -897,6 +900,7 @@ public:
void report_budget_items(const date_t& date);
+ virtual void flush();
virtual void operator()(post_t& post);
};