From 0b8b246fcd88e1309bbbfff0b7e7bd4656fe3487 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 24 Jul 2014 02:16:13 +0200 Subject: [PATCH] extra/hledger-equity: print closing balance too. --- extra/hledger-equity.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extra/hledger-equity.hs b/extra/hledger-equity.hs index 4b470a14f..43ca0ffae 100755 --- a/extra/hledger-equity.hs +++ b/extra/hledger-equity.hs @@ -44,5 +44,7 @@ main = do ps = [posting{paccount=a, pamount=b} | ((a,_,_),b) <- acctbals] ++ [posting{paccount="equity:opening balances", pamount=balancingamt}] enddate = fromMaybe today $ queryEndDate (date2_ ropts_) q - txn = nulltransaction{tdate=enddate, tpostings=ps} - putStr $ showTransactionUnelided txn + nps = [posting{paccount=a, pamount=negate b} | ((a,_,_),b) <- acctbals] + ++ [posting{paccount="equity:closing balances", pamount=negate balancingamt}] + putStr $ showTransactionUnelided (nulltransaction{tdate=enddate, tpostings=nps}) + putStr $ showTransactionUnelided (nulltransaction{tdate=enddate, tpostings=ps})