mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-25 19:31:44 +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]
|
ps = [posting{paccount=a, pamount=b} | ((a,_,_),b) <- acctbals]
|
||||||
++ [posting{paccount="equity:opening balances", pamount=balancingamt}]
|
++ [posting{paccount="equity:opening balances", pamount=balancingamt}]
|
||||||
enddate = fromMaybe today $ queryEndDate (date2_ ropts_) q
|
enddate = fromMaybe today $ queryEndDate (date2_ ropts_) q
|
||||||
txn = nulltransaction{tdate=enddate, tpostings=ps}
|
nps = [posting{paccount=a, pamount=negate b} | ((a,_,_),b) <- acctbals]
|
||||||
putStr $ showTransactionUnelided txn
|
++ [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