Fixes and more attractive form style
This commit is contained in:
parent
6c43accd5f
commit
ba30ec40a2
@ -69,13 +69,24 @@ table.history p.linked-credit {
|
|||||||
font-size: smaller;
|
font-size: smaller;
|
||||||
}
|
}
|
||||||
|
|
||||||
dl dd + dt {
|
input, textarea {
|
||||||
border-top: 1px solid lightgrey;
|
border: 1px solid #ddd;
|
||||||
margin-top: 1em;
|
}
|
||||||
|
|
||||||
|
dl dt {
|
||||||
|
float: left;
|
||||||
|
clear: left;
|
||||||
|
width: 7em;
|
||||||
|
text-align: right;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
dl dd {
|
||||||
|
margin: 0 0 0 8em;
|
||||||
|
padding: 0 0 0.5em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
select {
|
||||||
border:none;
|
border: 1px solid #ddd;
|
||||||
background-color:transparent;
|
background-color:transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<input id="date" name="date" value="<%= $credit->date %>"> (Format: YYYY-MM-DD)
|
<input id="date" name="date" value="<%= $credit->date %>"> (Format: YYYY-MM-DD)
|
||||||
% end
|
% end
|
||||||
% $r{purpose} = begin
|
% $r{purpose} = begin
|
||||||
<input id="purpose" name="purpose" style="width:100%" value="<%= $credit->purpose %>">
|
<textarea id="purpose" name="purpose" style="width:100%"><%= $credit->purpose %></textarea>
|
||||||
% end
|
% end
|
||||||
% $r{category} = begin
|
% $r{category} = begin
|
||||||
% my $category = $credit->category // '';
|
% my $category = $credit->category // '';
|
||||||
@ -26,7 +26,7 @@
|
|||||||
<input id="value" name="value" value="<%= $credit->value %>"> Cent (declare target credit with "0")
|
<input id="value" name="value" value="<%= $credit->value %>"> Cent (declare target credit with "0")
|
||||||
% end
|
% end
|
||||||
% $r{account} = begin
|
% $r{account} = begin
|
||||||
<input id="account" name="account" value="<%= $credit->account->ID %>">
|
<%= $credit->account->ID %>
|
||||||
% end
|
% end
|
||||||
|
|
||||||
<dl class="upsert">
|
<dl class="upsert">
|
||||||
@ -72,11 +72,10 @@
|
|||||||
% if ( $account //= $credit->account ) {
|
% if ( $account //= $credit->account ) {
|
||||||
<h2>Spend for arrears</h2>
|
<h2>Spend for arrears</h2>
|
||||||
% my $arrears = ( ref $account ? $account : app->db->resultset("Account")->find($account) )->current_arrears;
|
% my $arrears = ( ref $account ? $account : app->db->resultset("Account")->find($account) )->current_arrears;
|
||||||
% if ( $arrears->first() ) {
|
% if ( $arrears->count() ) {
|
||||||
<p><%= $credit->value == $credit->spent ? "The credit is already spent. Unless you revoke any outgoings above, there is no point in checking" : "Check" %> <%= %paid_debits ? "other" : "" %> debits you want to <strong>spend this credit</strong> for:</p>
|
<p><%= $credit->value && $credit->value == $credit->spent ? "The credit is already spent. Unless you revoke any outgoings above, there is no point in checking" : "Check" %> <%= %paid_debits ? "other" : "" %> debits you want to <strong>spend this credit</strong> for:</p>
|
||||||
<p>Check arrears you want to <strong>use this credit</strong> for.</p>
|
|
||||||
<table>
|
<table>
|
||||||
<tr><th>S</th><th>date</th><th>purpose</th><th>to pay</th></tr>
|
<tr><th>S</th><th>date</th><th>purpose</th><th>to pay</th><th>note</th></tr>
|
||||||
% while ( my $d = $arrears->next ) {
|
% while ( my $d = $arrears->next ) {
|
||||||
% next if $paid_debits{ $d->billId };
|
% next if $paid_debits{ $d->billId };
|
||||||
<tr><td><input type="checkbox" name="spendFor" value="<%= $d->billId %>"></td>
|
<tr><td><input type="checkbox" name="spendFor" value="<%= $d->billId %>"></td>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<input id="date" name="date" value="<%= $debit->date %>"> (Format: YYYY-MM-DD)
|
<input id="date" name="date" value="<%= $debit->date %>"> (Format: YYYY-MM-DD)
|
||||||
% end
|
% end
|
||||||
% $r{purpose} = begin
|
% $r{purpose} = begin
|
||||||
<input id="purpose" name="purpose" style="width:100%" value="<%= $debit->purpose %>">
|
<textarea id="purpose" name="purpose" style="width:100%"><%= $debit->purpose %></textarea>
|
||||||
% end
|
% end
|
||||||
% $r{category} = begin
|
% $r{category} = begin
|
||||||
% my $category = $debit->category // '';
|
% my $category = $debit->category // '';
|
||||||
@ -102,8 +102,8 @@ oops
|
|||||||
% if ( $account ||= $debit->debtor ) {
|
% if ( $account ||= $debit->debtor ) {
|
||||||
<h2>Pay with credits</h2>
|
<h2>Pay with credits</h2>
|
||||||
% my $credits = app->db->resultset("Account")->find($account)->available_credits;
|
% my $credits = app->db->resultset("Account")->find($account)->available_credits;
|
||||||
% if ( $credits->first() ) {
|
% if ( $credits->count() ) {
|
||||||
<p><%= $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->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>
|
||||||
<table>
|
<table>
|
||||||
<tr><th>S</th><th>date</th><th>purpose</th><th>to spend</th><th>note</th></tr>
|
<tr><th>S</th><th>date</th><th>purpose</th><th>to spend</th><th>note</th></tr>
|
||||||
% while ( my $c = $credits->next ) {
|
% while ( my $c = $credits->next ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user