From 229c0071b3edbab080c5d5de9ce67456ea4e0fd5 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Mon, 3 Apr 2017 08:36:07 +0200 Subject: [PATCH] BWA mit Kontennachweis MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Unterhalb der BWA gibt es einen Knopf "Kontenliste zeigen", wo eine nach Kontennummer sortierte Liste aller Konten, mit dazugehörigem Betrag und der Kategorie, aufgeklappt wird. --- SL/RP.pm | 11 +++++++ templates/webpages/rp/bwa.html | 56 ++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/SL/RP.pm b/SL/RP.pm index 452f1164d..e6aecd9eb 100644 --- a/SL/RP.pm +++ b/SL/RP.pm @@ -1646,6 +1646,17 @@ sub bwa { &get_accounts_g($dbh, $last_period, $kummfromdate, $kummtodate, $form, "pos_bwa"); } + my %charts_by_category = + partition_by { $_->{pos_bwa} } + sort_by { $_->{accno} } + map { $form->{charts}->{$_} } + keys %{ $form->{charts} }; + $form->{"charts_by_category"} = \%charts_by_category; + + # $main::lxdebug->dump(0, "charts_by_category", $form->{charts_by_category} ); + + $form->{category_names} = { selectall_as_map($form, $dbh, "select * from bwa_categories order by id", 'id', 'description') }; + my @periods = qw(jetzt kumm); my @gesamtleistung = qw(1 3); my @gesamtkosten = qw (10 11 12 13 14 15 16 17 18 20); diff --git a/templates/webpages/rp/bwa.html b/templates/webpages/rp/bwa.html index 8c8793183..7da5aa7f1 100644 --- a/templates/webpages/rp/bwa.html +++ b/templates/webpages/rp/bwa.html @@ -1,6 +1,7 @@ [%- USE T8 %] [%- USE HTML %] [%- USE LxERP %] +[%- USE L %] @@ -513,3 +514,58 @@ colspan="11"> 
+ +
+[% L.button_tag('', LxERP.t8('Show chart list'), id="show_chartlist_button", class="hide") %] +[% L.button_tag('', LxERP.t8('Hide chart list'), id="hide_chartlist_button", class="hide") %] +
+
[% 'Chart list' | $T8 %]
+
+ + + + + + +[% FOREACH key = charts.keys.sort %] +[% UNLESS charts.$key.pos_bwa %] +[% NEXT %] +[% END %] + + + + + +[% END %] +
[% 'Chart' | $T8 %][% 'Amount' | $T8 %][% 'Category' | $T8 %]
[% charts.$key.accno %][% LxERP.format_amount( charts.$key.amount, 2 ) %][% HTML.escape(category_names.item(charts.$key.pos_bwa)) %]
+
+
+ +[% # L.dump(charts_by_category.item(1)) # Debug Umsatzerlöse %] + + -- 2.20.1