Construct transactionsreport as a list

This commit is contained in:
Saku Laesvuori 2026-01-15 16:04:02 +02:00
parent 9aecef432c
commit b40628c1e6
2 changed files with 39 additions and 26 deletions

View File

@ -158,8 +158,30 @@ ul {
vertical-align:bottom; vertical-align:bottom;
} }
.transactionsreport .posting td { .transactionsreport {
border: none !important; margin-top: 1ex;
border-top: solid 2px #ddd;
}
.transaction {
border-bottom-style: solid;
border-width: 1px;
border-color: #ddd;
padding-bottom: 1ex;
padding: 5px;
}
.transaction .title > * {
display: inline-block;
}
.postings {
padding-left: 2em;
}
.transaction .posting {
display: flex;
justify-content: space-between;
} }
.negative { .negative {

View File

@ -6,32 +6,23 @@ $if elem AddPermission perms
data-toggle="modal" data-target="#addmodal" title="Lisää uusi tapahtuma kirjanpitoon."> data-toggle="modal" data-target="#addmodal" title="Lisää uusi tapahtuma kirjanpitoon.">
Kirjaa tapahtuma Kirjaa tapahtuma
<div .table-responsive> <ol .transactionsreport .list-unstyled>
<table .transactionsreport .table .table-condensed>
<thead>
<th .date style="text-align:left;">Päiväys
<th .description style="text-align:left;">Selite
<th .account style="text-align:left;">Tili
<th .amount style="text-align:right;">Summa
$forall torig <- items $forall torig <- items
<tr .title ##{transactionFrag torig} title="#{showTransaction torig}"> <li .transaction ##{transactionFrag torig}>
<td .date nowrap> <div .title title="#{showTransaction torig}">
#{show (tdate torig)} <time .date datetime="#{show (tdate torig)}" nowrap>
<td colspan=2> #{show (tdate torig)}
#{textElideRight 60 (tdescription torig)} <div>
<td .amount style="text-align:right;"> #{textElideRight 60 (tdescription torig)}
$forall Posting { paccount = acc, pamount = amt } <- tpostings torig <ul .postings>
<tr .posting> $forall Posting { paccount = acc, pamount = amt } <- tpostings torig
<td> <li .posting>
<td> <div .account>
<td> <a href="@?{acctlink acc}##{tindex torig}" title="#{acc}">
&nbsp; #{elideAccountName 40 acc}
<a href="@?{acctlink acc}##{tindex torig}" title="#{acc}"> <div .amount style="text-align:right;">
#{elideAccountName 40 acc} ^{mixedAmountAsHtml amt}
<td .amount style="text-align:right;">
^{mixedAmountAsHtml amt}
$if elem AddPermission perms $if elem AddPermission perms
^{addModal AddR j today} ^{addModal AddR j today}