summaryrefslogtreecommitdiff
path: root/src/filters.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-10-27 08:04:31 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-10-27 08:30:59 -0400
commit88460db2fbb0ab76c0ab3705cc4043e7fb2726d4 (patch)
treea9d6824db1ecc83abf0d2e0d4ea8549f01e002ad /src/filters.cc
parenta8768587c8e6850e23ecbbfe4a108515b8ade892 (diff)
downloadfork-ledger-88460db2fbb0ab76c0ab3705cc4043e7fb2726d4.tar.gz
fork-ledger-88460db2fbb0ab76c0ab3705cc4043e7fb2726d4.tar.bz2
fork-ledger-88460db2fbb0ab76c0ab3705cc4043e7fb2726d4.zip
Added a new "budget" report
This is a balance report with four columns: Amount spent | Budgeted Amount | Difference | Percentage
Diffstat (limited to 'src/filters.cc')
-rw-r--r--src/filters.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/filters.cc b/src/filters.cc
index 3667c213..25649ad0 100644
--- a/src/filters.cc
+++ b/src/filters.cc
@@ -752,6 +752,15 @@ void budget_posts::report_budget_items(const date_t& date)
post_t& temp = temps.copy_post(post, xact);
temp.amount.in_place_negate();
+ if (flags & BUDGET_WRAP_VALUES) {
+ value_t seq;
+ seq.push_back(0L);
+ seq.push_back(temp.amount);
+
+ temp.xdata().compound_value = seq;
+ temp.xdata().add_flags(POST_EXT_COMPOUND);
+ }
+
++pair.first;
begin = *pair.first.start;