fix(beancount): +beancount/balance: omit zeroed accounts

This commit is contained in:
Henrik Lissner
2025-05-16 10:55:47 +02:00
parent 6d9484820a
commit 55e97eb78a

View File

@ -127,9 +127,12 @@ If REVERSE (the prefix arg) is non-nil, sort the transactions in reverst order."
current-prefix-arg)
(beancount--run "bean-query"
buffer-file-name
(format "balances WHERE NOT close_date(account)%s"
(format (concat "SELECT account, sum(position) as balance %s "
"GROUP BY account "
"HAVING not empty(sum(position)) "
"ORDER BY account")
(if all-accounts
"" (format " AND account ~ \"^(Assets|Liabilities)\"" ))))))
"" (format "WHERE account ~ \"^(Assets|Liabilities)\"" ))))))
;;;###autoload
(defun +beancount/clone-transaction ()