Display balance assertions in hledger web

This commit is contained in:
Saku Laesvuori 2026-01-22 19:13:46 +02:00
parent aa928900f8
commit 912a953f84
2 changed files with 11 additions and 2 deletions

View File

@ -223,6 +223,11 @@ ul {
justify-content: space-between;
}
.balance-assertion {
filter: contrast(50%);
font-size: smaller;
}
.negative {
color: #a94442;
}

View File

@ -51,14 +51,18 @@ $if elem AddPermission perms
#{tagValue}
<ul .postings>
$forall Posting { paccount = acc, pamount = amt, ptags = tags } <- tpostings torig
$forall Posting { paccount = acc, pamount = amt, pbalanceassertion = passert, ptags = tags } <- tpostings torig
<li .posting>
<div .posting-row>
<div .account>
<a href="@?{acctlink acc}##{tindex torig}" title="#{acc}">
#{elideAccountName 40 acc}
<div .amount style="text-align:right;">
^{mixedAmountAsHtml amt}
<span .posted-amount>
^{mixedAmountAsHtml amt}
$maybe BalanceAssertion { baamount = assertAmt } <- passert
<span .balance-assertion>
jälkeen ^{mixedAmountAsHtml $ mixedAmount assertAmt}
$if null $ filter (isPostingTag acc) $ filter isVisibleTag tags
$else
<ul .tags>