Reformed history items: Hide target credit purpose as it is insignificant
This commit is contained in:
parent
d7db9a2eb1
commit
e91405b041
@ -62,6 +62,13 @@ table td.even_until {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table.history p {
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
table.history p.linked-credit {
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
dl dd + dt {
|
dl dd + dt {
|
||||||
border-top: 1px solid lightgrey;
|
border-top: 1px solid lightgrey;
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
|
@ -2,16 +2,22 @@
|
|||||||
|
|
||||||
<p>Reverse ordered list:</p>
|
<p>Reverse ordered list:</p>
|
||||||
|
|
||||||
<table>
|
<table class="history">
|
||||||
<tr><th>Timestamp</th><th>Purpose (own/other/debit)</th><th>debit</th><th>credit</th><th>note</th></tr>
|
<tr><th>Timestamp</th><th>Purpose (own/other/debit)</th><th>debit</th><th>credit</th></tr>
|
||||||
% while ( my $hr = $history->next ) {
|
% while ( my $hr = $history->next ) {
|
||||||
<tr><td><%= $hr->date %></td><td>
|
<tr><td><%= $hr->date %></td><td>
|
||||||
% my $this = $hr->this_credit;
|
|
||||||
<strong>On <a href="/credit/<%= $hr->credId %>"><%= <%= $this->credId %></a>:</strong> <%== nl2br $this->purpose %><br>
|
|
||||||
% my $that = $hr->that_credit;
|
% my $that = $hr->that_credit;
|
||||||
<strong>With <%= $that->account->ID %>/<a href="/credit/<%= $that->credId %>"><%= <%= $that->credId %></a>:</strong> <%== nl2br $that->purpose %><br>
|
% my $this = $hr->this_credit;
|
||||||
<strong>Pay <%= $hr->billId %>:</strong> <%== nl2br $hr->purpose %>
|
% my $credit_ref = begin
|
||||||
</td><td class="number"><%== money $hr->debit %></td><td class="number"><%== money $hr->credit %></td><td><%= $hr->note %></td></tr>
|
%== sprintf q{<strong>%s</strong><a href="/credit/%2$d">%d</a>}, shift() ? ($that->account->ID.q{.}, $that->credId) : (q{}, $this->credId)
|
||||||
|
% end
|
||||||
|
<p><strong><a href="/debit/<%= $hr->billId %>"><%= $hr->billId %></a>:</strong> <%= $hr->purpose %> → <%== $credit_ref->($hr->debit) %></p>
|
||||||
|
<p class="linked-credit">from <%= $credit_ref->($hr->credit) %>, <%= $hr->credit ? $that->purpose : $this->purpose %>
|
||||||
|
% if ( $hr->note ) {
|
||||||
|
<br>Note: <%= $hr->note %>
|
||||||
|
% }
|
||||||
|
</p>
|
||||||
|
</td><td class="number"><%== money $hr->debit %></td><td class="number"><%== money $hr->credit %></td></tr>
|
||||||
% }
|
% }
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user