mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-25 03:13:25 +03:00
extra/hledger-equity: print closing balance too.
This commit is contained in:
parent
c7a2126896
commit
0b8b246fcd
@ -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})
|
||||
|
Loading…
Reference in New Issue
Block a user