25 lines
947 B
Plaintext
25 lines
947 B
Plaintext
% title 'Transfer history';
|
|
|
|
<p>Reverse ordered list:</p>
|
|
|
|
<table class="history">
|
|
<tr><th>Timestamp</th><th>Purpose (own/other/debit)</th><th>debit</th><th>credit</th></tr>
|
|
% while ( my $hr = $history->next ) {
|
|
<tr><td><%= $hr->date %></td><td>
|
|
% my $that = $hr->that_credit;
|
|
% my $this = $hr->this_credit;
|
|
% my $credit_ref = begin
|
|
%== 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>
|
|
|
|
%= include 'filter-widget'
|