fix extra/hledger-equity compilation

This commit is contained in:
Simon Michael 2014-04-13 08:57:55 -07:00
parent c1485f43bb
commit 52957f48eb

View File

@ -24,8 +24,8 @@ main = do
let query = Or $ map Acct args let query = Or $ map Acct args
ropts = defreportopts{flat_=True} ropts = defreportopts{flat_=True}
(acctbals,_) = balanceReport ropts query j (acctbals,_) = balanceReport ropts query j
balancingamt = negate $ sum $ map (\(_,_,_,b) -> b) acctbals balancingamt = negate $ sum $ map (\((_,_,_),b) -> b) acctbals
ps = [posting{paccount=a, pamount=b} | (a,_,_,b) <- acctbals] ps = [posting{paccount=a, pamount=b} | ((a,_,_),b) <- acctbals]
++ [posting{paccount="equity:opening balances", pamount=balancingamt}] ++ [posting{paccount="equity:opening balances", pamount=balancingamt}]
txn = nulltransaction{tdate=d, tpostings=ps} txn = nulltransaction{tdate=d, tpostings=ps}
putStr $ showTransactionUnelided txn putStr $ showTransactionUnelided txn