summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2019-11-26 23:24:22 +0100
committerAlan Pearce2019-11-26 23:24:22 +0100
commit85484881997989635e719b44889c439e6c8c15a9 (patch)
treebd0d9e01f7943a1caeeb75854bbc219192fca72f
parent8f859f1ec1deef2ddfbdadc0d7acfa21441ce9ac (diff)
downloadnixfiles-85484881997989635e719b44889c439e6c8c15a9.tar.lz
nixfiles-85484881997989635e719b44889c439e6c8c15a9.tar.zst
nixfiles-85484881997989635e719b44889c439e6c8c15a9.zip
Emacs: tweak ledger reports
-rw-r--r--user/emacs/.emacs.d/init.el14
1 files changed, 10 insertions, 4 deletions
diff --git a/user/emacs/.emacs.d/init.el b/user/emacs/.emacs.d/init.el
index a2c65924..f426f58f 100644
--- a/user/emacs/.emacs.d/init.el
+++ b/user/emacs/.emacs.d/init.el
@@ -705,10 +705,16 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
                   ledger-narrow-on-reconcile t
                   ledger-clear-whole-transactions t
                   ledger-reports `(("Monthly Expenses" "ledger -f %(ledger-file) reg -M \\^Expenses --real -X EUR -l \"payee != 'Opening Balances'\"")
-                                   ("Average Monthly Expenses (Past 12 Months)" ,(concat "ledger -f %(ledger-file) -b "
-                                                                                    (format-time-string "%Y-%m" (time-add (current-time) (days-to-time -365)))
-                                                                                    " --monthly --average balance ^Expenses"))
-                                   ("Expenses:This Month" "ledger -f %(ledger-file) bal \\^Expenses -p \"this month\"")
+                                   ("Total Expenses:This Month" "ledger -f %(ledger-file) bal \\^Expenses -p \"this month\"")
+                                   ("Total Expenses:Past 90 Days" ,(concat "ledger -f %(ledger-file) balance ^Expenses -b "
+                                                                           (format-time-string "%Y-%m-%d" (time-add (current-time) (days-to-time -90)))))
+                                   ("Total Expenses:Past 180 Days" ,(concat "ledger -f %(ledger-file) balance ^Expenses -b "
+                                                                            (format-time-string "%Y-%m-%d" (time-add (current-time) (days-to-time -180)))))
+                                   ("Expenses:This Month" "ledger -f %(ledger-file) register \\^Expenses -p \"this month\"")
+                                   ("Expenses:Past 90 Days (monthly)" ,(concat "ledger -f %(ledger-file) register --monthly ^Expenses -b "
+                                                                     (format-time-string "%Y-%m-%d" (time-add (current-time) (days-to-time -90)))))
+                                   ("Expenses:Past 180 Days (monthly)" ,(concat "ledger -f %(ledger-file) register --monthly ^Expenses -b "
+                                                                      (format-time-string "%Y-%m-%d" (time-add (current-time) (days-to-time -180)))))
                                    ("All Account Balances" "ledger -f %(ledger-file) bal --current -R \\^Assets \\^Liabilities")))))