From 0913e54e93f6eac8b859d931269da8e12b9536aa Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 5 Dec 2012 23:51:42 +0000 Subject: [PATCH] 94: fix a regression with non-flat balance report, caused by previous fix Correct in all cases now, hopefully. --- hledger-lib/Hledger/Reports.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hledger-lib/Hledger/Reports.hs b/hledger-lib/Hledger/Reports.hs index 038e88682..eeecd6cf4 100644 --- a/hledger-lib/Hledger/Reports.hs +++ b/hledger-lib/Hledger/Reports.hs @@ -552,7 +552,7 @@ accountsReport opts q j = (items, total) markboring | no_elide_ opts = id | otherwise = markBoringParentAccounts items = map (accountsReportItem opts) accts' - total = sum [amt | (a,_,_,amt) <- items, accountNameLevel a == 1] + total = sum [amt | (a,_,indent,amt) <- items, if flat_ opts then accountNameLevel a == 1 else indent == 0] -- | In an account tree with zero-balance leaves removed, mark the -- elidable parent accounts (those with one subaccount and no balance