Various fixes; added full name to account data; do never transfer unchecked
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<%= $inter_header->($t) %>
|
||||
% }
|
||||
% my $u = $account->ID;
|
||||
<tr><th><a href="/account/<%= $u %>"><%= $u %></a></th>
|
||||
<tr><th><a href="/account/<%= $u %>" title="<%= $account->name %>"><%= $u %></a></th>
|
||||
<td class="even_until"><%= $bal->even_until // "never" %></td><td class="number"><%== money $bal->arrears %></td><td><a href="<%= $u %>/debits"><img class="icon" alt="List" src="/list.svg" alt="List"></td><td><a title="Add a debit" href="<%= $u %>/out"><img class="icon" src="/add-debit.svg" alt="Charge"></a></td>
|
||||
<td class="centered">
|
||||
% my $which = ($bal->arrears && 1) + ($bal->available && 1);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
% title 'Make transfers for ' . $account;
|
||||
|
||||
<p>Check at least one item of both tables. Make sure they correspond in regard to their purposes. <em><strong>Caution:</strong> When you do not check any items in either table, this effectively is to check all in it!</em></p>
|
||||
<p>Check at least one item of both tables. Make sure they correspond in regard to their purposes.</em></p>
|
||||
|
||||
<form method="post">
|
||||
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
% title $name ? "Account $name" : "Create account";
|
||||
% title $id ? "Account $id" : "Create account";
|
||||
|
||||
% my %r;
|
||||
% $r{ID} = begin
|
||||
<input id="ID" name="ID" value="<%= $account->ID %>">
|
||||
% end
|
||||
% $r{name} = begin
|
||||
<input id="name" name="name" value="<%= $account->name %>">
|
||||
% end
|
||||
% $r{type} = begin
|
||||
<input id="type" name="type" value="<%= $account->type %>"> (<%= join(", ", @$types) %> or a new?)
|
||||
<input id="type" name="type" value="<%= $account->type %>"> (Currently there: <%= join(", ", @$types) %>)
|
||||
% end
|
||||
% $r{altId} = begin
|
||||
<input id="altId" name="altId" value="<%= $account->altId %>">
|
||||
% end
|
||||
% $r{IBAN} = begin
|
||||
<input id="IBAN" name="IBAN" value="<%= $account->IBAN %>">
|
||||
<input id="IBAN" name="IBAN" value="<%= $account->IBAN %>"> (may also be empty or '*' – s. help)
|
||||
% end
|
||||
|
||||
<form method="post">
|
||||
@@ -32,4 +35,9 @@
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
|
||||
% my $help = begin
|
||||
<p><strong>What to input into "IBAN"?</strong> To restrict outgoing payments from that account to a certain bank account, insert its account number. To allow outgoing payment to any bank account, input wildcard (*). To disallow outgoing payment from that account, input nothing.</p>
|
||||
|
||||
<p>When inserting a proper number, this number must be included in all outgoing payments from that account. Outgoing payments differ from internal payments in that transferCredit is undefined.</p>
|
||||
% end
|
||||
% stash help => $help;
|
||||
|
||||
@@ -92,6 +92,6 @@
|
||||
% }
|
||||
% }
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
<p><button type="submit">Submit</button></p>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -6,7 +6,14 @@
|
||||
<tr><th>Id</th><th>Date</th><th>Purpose</th><th>value</th><th>paid</th><th>to</th></tr>
|
||||
% while ( my $debit = $debits->next ) {
|
||||
% my $tgt = $debit->target;
|
||||
<tr><td><a href="/debit/<%= $debit->billId %>"><%= $debit->billId %></a></td><td><%= $debit->date %></td><td><%== nl2br $debit->purpose %></td><td class="number"><%== money $debit->value %></td><td class="number <%= $debit->paid < $debit->value ? "mark" : "" %>"><%== money $debit->paid %><td><a href="/credit/<%= $tgt->credId %>"><%= $tgt->account->ID %></a></tr>
|
||||
<tr><td><a href="/debit/<%= $debit->billId %>"><%= $debit->billId %></a></td><td><%= $debit->date %></td><td><%== nl2br $debit->purpose %></td><td class="number"><%== money $debit->value %></td><td class="number <%= $debit->paid < $debit->value ? "mark" : "" %>"><%== money $debit->paid %><td>
|
||||
% if ( $tgt ) {
|
||||
<a href="/credit/<%= $tgt->credId %>"><%= $tgt->account->ID %></a>
|
||||
% }
|
||||
% else {
|
||||
(outgoing)
|
||||
% }
|
||||
</td></tr>
|
||||
% }
|
||||
</table>
|
||||
|
||||
|
||||
@@ -30,9 +30,8 @@
|
||||
% end
|
||||
% $r{targetCredit} = begin
|
||||
% if ( !@$targets ) {
|
||||
<p style="color:red;">There are no target credits available. Target credits are credits of other accounts that either still have a value of 0, or which have already been targetted. Please create a target credit record first, because all debits must refer to one so settlements can be fulfilled.</p>
|
||||
<div style="color:red;">There are no target credits available. Target credits are credits of other accounts that either still have a value of 0, or which have already been targetted. Please create a target credit record first, because all debits must refer to one so settlements can be fulfilled.</div>
|
||||
% $targets = [ ['', '', ''] ];
|
||||
oops
|
||||
% }
|
||||
% my $cmpacc = $targets->[0][1];
|
||||
% my $target = $debit->targetCredit // '';
|
||||
@@ -103,7 +102,7 @@ oops
|
||||
<h2>Pay with credits</h2>
|
||||
% my $credits = app->db->resultset("Account")->find($account)->available_credits;
|
||||
% if ( $credits->count() ) {
|
||||
<p><%= $debit->value && $debit->value == $debit->value ? "The debt is already settled. Unless you revoke any incomings above, there is no point in checking" : "Check" %> <%= %used_credits ? "other" : "" %> credits you want to <strong>pay this debit</strong> with:</p>
|
||||
<p><%= $debit->value && $debit->value == $debit->paid ? "The debt is already settled. Unless you revoke any incomings above, there is no point in checking" : "Check" %> <%= %used_credits ? "other" : "" %> credits you want to <strong>pay this debit</strong> with:</p>
|
||||
<table>
|
||||
<tr><th>S</th><th>date</th><th>purpose</th><th>to spend</th><th>note</th></tr>
|
||||
% while ( my $c = $credits->next ) {
|
||||
@@ -122,6 +121,6 @@ oops
|
||||
% }
|
||||
% }
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
<p><button type="submit">Submit</button></p>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -12,12 +12,17 @@
|
||||
% }
|
||||
<form method="post" action="/login"><p>
|
||||
|
||||
User id: <input name="user" type="text" placeholder="user id or email" value="<%= param('user') %>"><br>
|
||||
Password: <input name="password" type="password"><br>
|
||||
<dl>
|
||||
<dt>User id</dt>
|
||||
<dd><input name="user" type="text" placeholder="user id or email" value="<%= param('user') %>"></dd>
|
||||
<dt>Password</dt>
|
||||
<dd><input name="password" type="password"></dd>
|
||||
% if ( my $token = param 'token' ) {
|
||||
Repeat: <input name="samepassword" type="password"><br>
|
||||
<input type="hidden" name="token" value="<%= $token %>"><br>
|
||||
<dt>Repeat</dt>
|
||||
<dd><input name="samepassword" type="password">
|
||||
<input type="hidden" name="token" value="<%= $token %>">
|
||||
</dd>
|
||||
% }
|
||||
<button type="submit">Login</button>
|
||||
<p><button type="submit">Login</button></p>
|
||||
|
||||
</p></form>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user