diff --git a/TrsrDB/HTTP.pm b/TrsrDB/HTTP.pm index c74fec2..254ef9f 100644 --- a/TrsrDB/HTTP.pm +++ b/TrsrDB/HTTP.pm @@ -88,7 +88,7 @@ sub startup { $check->get('/bankStatement' => sub { my $c = shift; my $records = $c->app->db->resultset("ReconstructedBankStatement") - ->search( process_table_filter_widget($c) ); + ->search( process_table_filter_widget($c, {}, { order => 'date' }) ); $c->stash( records => $records ); $c->render('bankStatement'); }); @@ -339,7 +339,7 @@ sub process_table_filter_widget { sub _get_trace_placeholder { \<<'EOF' In this area, the server can trace SQL commands executed to fulfill your request. If the admin wants that, they can run the server with environment variable DBIC_TRACE=1. -All substantial logic of Treasure DB is done in the scope of the database itself. In consequence, you could do without this HTTP interface and input all SQL commands shown here directly in a general-purpose SQLite3 user interface. Thus you will get roughly the same results. +All substantial logic of Treasure DB is realized as triggers and views right in the database file. In consequence, you could do without this HTTP interface and input all SQL commands directly in a general-purpose SQLite3 user interface. Thus you would get essentially the same results, except they do not look as nice. EOF } 1; diff --git a/TrsrDB/HTTP/Account.pm b/TrsrDB/HTTP/Account.pm index 224c7e1..8051589 100644 --- a/TrsrDB/HTTP/Account.pm +++ b/TrsrDB/HTTP/Account.pm @@ -43,7 +43,7 @@ sub upsert { if ( $self->req->method eq 'POST' ) { my $p = $self->req->params->to_hash; - if ( $p->{IBAN} eq q{*} ) { + if ( ($p->{IBAN}//q{}) eq q{*} ) { $p->{IBAN} = q{}; } elsif ( !$iban ) { diff --git a/site/style.css b/site/style.css index 4d40e9a..957e7ab 100644 --- a/site/style.css +++ b/site/style.css @@ -15,10 +15,17 @@ h1 { table { border-collapse: collapse; + width:100%; } table td, table th { border: 1px solid darkgrey; + vertical-align: top; +} + +table.accounts tr.group-heading th { + border:none; + vertical-align:middle; } table tr:nth-child(even) { @@ -44,12 +51,22 @@ table td.number { text-align: right; font-family: monospace, monospace; /* Hack to prevent browser default size reduction of monospace font */ font-size:1em; + vertical-align: bottom; } table td.mark { background-color:rgba(255,0,0,0.1); } +table td input { + width:100%; + box-sizing: border-box; +} + +form { + margin: 1em 0; +} + a.transfer-btn { background-color:rgba(224,32,0,0.4); font-weight: bold; @@ -73,6 +90,9 @@ input, textarea { border: 1px solid #ddd; padding: 2px; } +input[type=checkbox], input[type=radio] { + border: none; +} dl dt { float: left; @@ -117,3 +137,17 @@ img.icon { color: darkgrey; text-align: center; } + +a.add-item-btn:link, +a.add-item-btn:visited { + display: block; + float: right; + font-variant: small-caps; + background-color: #eee; + border: 2px outset grey; + padding: 3px; + border-radius: 3px; + text-decoration: none; + color: inherit; + font-weight:normal; +} diff --git a/templates/account/history.html.ep b/templates/account/history.html.ep index b7addb1..9befb03 100644 --- a/templates/account/history.html.ep +++ b/templates/account/history.html.ep @@ -9,12 +9,15 @@ % my $that = $hr->that_credit; % my $this = $hr->this_credit; % my $credit_ref = begin -%== sprintf q{%s%d}, shift() ? ($that->account->ID.q{.}, $that->credId) : (q{}, $this->credId) +% my $that_acc = $that && $that->account; +% my $that_account_id = $that ? $that_acc->ID : q{(out)}; +% my $that_credit_id = $that ? $that->credId : ""; +%== sprintf q{%s%d}, shift() ? ($that_account_id.q{:}, $that_credit_id) : (q{}, $this->credId) % end -
<%= $hr->billId %>: <%= $hr->purpose %> → <%== $credit_ref->($hr->debit) %>
-from <%= $credit_ref->($hr->credit) %>, <%= $hr->credit ? $that->purpose : $this->purpose %> +
<%= $hr->billId %>: <%== nl2br $hr->purpose %> → <%== $credit_ref->($hr->debit) %>
+↑ <%= $credit_ref->($hr->credit) =%>, <%= $hr->credit ? $that->purpose : $this->purpose %>
% if ( $hr->note ) {
-
Note: <%= $hr->note %>
+
Note: <%= $hr->note %>
% }
Date of debt up to and including which all is settled.
Unpaid debits
Link to a view where you can match credit and debit and have the software transfer money in between automatically. Yellow "N/A" means there is no money to transfer as either credit or debit is 0. Green "N/A" means there is no money to transfer because the account is even.
Credits that have not been used or not to full extent, yet
Paid debits targetting credits of that account.
Unpaid or not fully paid debits targetting credits of that account.