mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-29 13:22:27 +03:00
web: show a count of postings in each account
This commit is contained in:
parent
fb9fb50cfd
commit
9a5e5da3aa
@ -24,6 +24,7 @@ body { backgroun
|
||||
|
||||
.balancereport .inacct { background-color:#eee; font-weight:bold; }
|
||||
.notinacct, .notinacct :link, .notinacct :visited, .notinacct .negative { /*color:#aaa;*/ }
|
||||
.balancereport .numpostings { padding-left:1em; color:#aaa; }
|
||||
|
||||
/*------------------------------------------------------------------------------------------*/
|
||||
/* 2. font families & sizes */
|
||||
|
@ -3,3 +3,4 @@
|
||||
#{indent}
|
||||
<a href="@?{accturl}">#{adisplay}
|
||||
<td.balance align=right>#{mixedAmountAsHtml abal}
|
||||
<td.numpostings align=right>(#{numpostingsinacct acct})
|
||||
|
@ -126,6 +126,8 @@ accountUrl a = "inacct:" ++ quoteIfSpaced a -- (accountNameToAccountRegex a)
|
||||
balanceReportAsHtml :: [Opt] -> ViewData -> BalanceReport -> Hamlet AppRoute
|
||||
balanceReportAsHtml _ vd@VD{here=here,q=q,m=m,qopts=qopts,j=j} (items,total) = $(Settings.hamletFile "balancereport")
|
||||
where
|
||||
l = journalToLedger nullfilterspec j
|
||||
numpostingsinacct = length . apostings . ledgerAccount l
|
||||
filtering = not $ null q
|
||||
inacctmatcher = inAccountMatcher qopts
|
||||
itemAsHtml :: ViewData -> BalanceReportItem -> Hamlet AppRoute
|
||||
|
Loading…
Reference in New Issue
Block a user