tweak(beancount): +beancount/balance w/ prefix arg

Without the prefix arg, it will only display the balance of Assets and
Liabilities.  With it, the balance of all accounts will be shown.
This commit is contained in:
Henrik Lissner 2024-07-07 05:11:10 -04:00
parent a99863a76f
commit c45c8cee35
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -120,11 +120,13 @@ If REVERSE (the prefix arg) is non-nil, sort the transactions in reverst order."
(defvar compilation-read-command) (defvar compilation-read-command)
;;;###autoload ;;;###autoload
(defun +beancount/balance () (defun +beancount/balance (&optional all-accounts)
"Display a balance report with bean-report (bean-report bal)." "Display a balance report with bean-report (bean-report bal)."
(interactive) (interactive "P")
(let (compilation-read-command) (let ((args (unless all-accounts '("-e" "Assets|Liabilities")))
(beancount--run "bean-report" buffer-file-name "bal"))) compilation-read-command
current-prefix-arg)
(apply #'beancount--run "bean-report" buffer-file-name "balances" args)))
;;;###autoload ;;;###autoload
(defun +beancount/clone-transaction () (defun +beancount/clone-transaction ()