diff --git a/site/style.css b/site/style.css index ff27654..52f442b 100644 --- a/site/style.css +++ b/site/style.css @@ -69,13 +69,24 @@ table.history p.linked-credit { font-size: smaller; } -dl dd + dt { - border-top: 1px solid lightgrey; - margin-top: 1em; +input, textarea { + border: 1px solid #ddd; +} + +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 { - border:none; + border: 1px solid #ddd; background-color:transparent; } diff --git a/templates/credit/upsert.html.ep b/templates/credit/upsert.html.ep index e12d894..19f234c 100644 --- a/templates/credit/upsert.html.ep +++ b/templates/credit/upsert.html.ep @@ -9,7 +9,7 @@ (Format: YYYY-MM-DD) % end % $r{purpose} = begin - + % end % $r{category} = begin % my $category = $credit->category // ''; @@ -26,7 +26,7 @@ Cent (declare target credit with "0") % end % $r{account} = begin - + <%= $credit->account->ID %> % end
@@ -72,11 +72,10 @@ % if ( $account //= $credit->account ) {

Spend for arrears

% my $arrears = ( ref $account ? $account : app->db->resultset("Account")->find($account) )->current_arrears; -% if ( $arrears->first() ) { -

<%= $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 spend this credit for:

-

Check arrears you want to use this credit for.

+% if ( $arrears->count() ) { +

<%= $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 spend this credit for:

- + % while ( my $d = $arrears->next ) { % next if $paid_debits{ $d->billId }; diff --git a/templates/debit/upsert.html.ep b/templates/debit/upsert.html.ep index dd56102..8779fd5 100644 --- a/templates/debit/upsert.html.ep +++ b/templates/debit/upsert.html.ep @@ -12,7 +12,7 @@ (Format: YYYY-MM-DD) % end % $r{purpose} = begin - + % end % $r{category} = begin % my $category = $debit->category // ''; @@ -102,8 +102,8 @@ oops % if ( $account ||= $debit->debtor ) {

Pay with credits

% my $credits = app->db->resultset("Account")->find($account)->available_credits; -% if ( $credits->first() ) { -

<%= $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 pay this debit with:

+% if ( $credits->count() ) { +

<%= $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 pay this debit with:

Sdatepurposeto pay
Sdatepurposeto paynote
% while ( my $c = $credits->next ) {
Sdatepurposeto spendnote