diff --git a/site/style.css b/site/style.css index 16accc3..ff27654 100644 --- a/site/style.css +++ b/site/style.css @@ -62,6 +62,13 @@ table td.even_until { text-align: center; } +table.history p { + margin:0; +} +table.history p.linked-credit { + font-size: smaller; +} + dl dd + dt { border-top: 1px solid lightgrey; margin-top: 1em; diff --git a/templates/account/history.html.ep b/templates/account/history.html.ep index cbb9da4..b7addb1 100644 --- a/templates/account/history.html.ep +++ b/templates/account/history.html.ep @@ -2,16 +2,22 @@

Reverse ordered list:

- - +
TimestampPurpose (own/other/debit)debitcreditnote
+ % while ( my $hr = $history->next ) { +% my $this = $hr->this_credit; +% my $credit_ref = begin +%== sprintf q{%s%d}, shift() ? ($that->account->ID.q{.}, $that->credId) : (q{}, $this->credId) +% end +

<%= $hr->billId %>: <%= $hr->purpose %> → <%== $credit_ref->($hr->debit) %>

+

from <%= $credit_ref->($hr->credit) %>, <%= $hr->credit ? $that->purpose : $this->purpose %> +% if ( $hr->note ) { +
Note: <%= $hr->note %> +% } +

+ % }
TimestampPurpose (own/other/debit)debitcredit
<%= $hr->date %> -% my $this = $hr->this_credit; -On <%= <%= $this->credId %>: <%== nl2br $this->purpose %>
% my $that = $hr->that_credit; -With <%= $that->account->ID %>/<%= <%= $that->credId %>: <%== nl2br $that->purpose %>
-Pay <%= $hr->billId %>: <%== nl2br $hr->purpose %> -
<%== money $hr->debit %><%== money $hr->credit %><%= $hr->note %>
<%== money $hr->debit %><%== money $hr->credit %>