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:
parent
a99863a76f
commit
c45c8cee35
1 changed files with 6 additions and 4 deletions
|
@ -120,11 +120,13 @@ If REVERSE (the prefix arg) is non-nil, sort the transactions in reverst order."
|
|||
|
||||
(defvar compilation-read-command)
|
||||
;;;###autoload
|
||||
(defun +beancount/balance ()
|
||||
(defun +beancount/balance (&optional all-accounts)
|
||||
"Display a balance report with bean-report (bean-report bal)."
|
||||
(interactive)
|
||||
(let (compilation-read-command)
|
||||
(beancount--run "bean-report" buffer-file-name "bal")))
|
||||
(interactive "P")
|
||||
(let ((args (unless all-accounts '("-e" "Assets|Liabilities")))
|
||||
compilation-read-command
|
||||
current-prefix-arg)
|
||||
(apply #'beancount--run "bean-report" buffer-file-name "balances" args)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +beancount/clone-transaction ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue