Changes and fixes in HTTP (e.g. + account upsertion)

====================================================
  * Account upsertion
  * Empty credit and debit forms, the latter with the ability to charge groups
  * Fixed redirection on posting transfers
  * Reverse order of credits and debits
  * Style: prevent monospace size reduction in some browsers; td.mark class
  * Totals in report and and bankStatement
This commit is contained in:
Florian "flowdy" Heß
2017-01-25 22:38:39 +01:00
parent d89ad8c580
commit 5aaff598d1
11 changed files with 110 additions and 28 deletions

View File

@@ -5,7 +5,9 @@
<tr><th>Account</th><th>Even until</th><th colspan="3">Arrears</th><th>Transfer</th><th colspan="3">Available</th><th>Earned</th><th>Promised</th><th>History</th><th>Report</th></tr>
% my ($type) = q{};
% my $inter_header = begin
<tr><th colspan="13"><%= shift || 'Club management accounts' %></th></tr>
% my $group = shift;
<tr><th colspan="11"><%= $group || 'Club management accounts' %></th>
<th colspan="2"><a href="/debit?group=<%= $group %>">Charge'm all</a></th></tr>
% end
% while ( my $account = $accounts->next ) {
% my $bal = $account->balance;
@@ -15,8 +17,8 @@
<%= $inter_header->($t) %>
% }
% my $u = $account->ID;
<tr><th><%= $u %></th>
<td class="even_until"><%= $bal->even_until // "never" %></td><td class="number"><%== money $bal->arrears %></td><td><a href="<%= $u %>/debits">list</td><td><a href="<%= $u %>/out">add</a></td>
<tr><th><a href="/account/<%= $u %>"><%= $u %></a></th>
<td class="even_until"><%= $bal->even_until // "never" %></td><td class="number"><%== money $bal->arrears %></td><td><a href="<%= $u %>/debits">list</td><td><a href="<%= $u %>/out">Charge</a></td>
<td class="centered">
% my $which = ($bal->arrears && 1) + ($bal->available && 1);
% if ( $which == 2 ) {
@@ -28,11 +30,11 @@
% else {
<span style="background-color:rgba(0,224,0,0.4);">&nbsp;N/A&nbsp;</span>
% }
</td><td class="number"><%== money $bal->available %></td><td><a href="<%= $u %>/credits">list</a></td><td><a href="<%= $u %>/in">add</a></td><td class="number"><%== money $bal->earned %></td><td class="number"><%== money $bal->promised %></td><td><a href="<%= $u %>/history">History</a></td><td><a href="<%= $u %>/report">Report</a></td></tr>
</td><td class="number"><%== money $bal->available %></td><td><a href="<%= $u %>/credits">list</a></td><td><a href="<%= $u %>/in">Credit</a></td><td class="number"><%== money $bal->earned %></td><td class="number"><%== money $bal->promised %></td><td><a href="<%= $u %>/history">History</a></td><td><a href="<%= $u %>/report">Report</a></td></tr>
% } # while
</table>
<p style="text-align:center;"><a href="/bankStatement">Reconstructed bank statement</a></p>
<p style="text-align:center;"><a href="/account/">Create account</a> &sdot; <a href="/bankStatement">Reconstructed bank statement</a></p>
<div class="help">
<h2>Column explanation</h2>
<dl>

View File

@@ -2,7 +2,10 @@
<table>
<tr><th>Date</th><th>Value</th><th>Purpose</th></tr>
% my $total;
% while ( my $record = $report->next ) {
% $total += $record->value;
<tr><td><%= $record->date %></td><td class="number"><%== money $record->value %></td><td><%== nl2br $record->purpose %></td></tr>
% }
<tr><td style="text-align:right;">In total:</td><td class="number"><%== money $total %></td></tr>
</table>