From: Werner Hahn Date: Mon, 10 Sep 2018 13:16:27 +0000 (+0200) Subject: Kundenstatistik: Emails X-Git-Tag: release-3.5.4~296 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=29318a627ee21ab0b324d329f78e3c4383af98c8;p=kivitendo-erp.git Kundenstatistik: Emails --- diff --git a/SL/Controller/CustomerVendorTurnover.pm b/SL/Controller/CustomerVendorTurnover.pm index e705a0868..d02fb76ed 100644 --- a/SL/Controller/CustomerVendorTurnover.pm +++ b/SL/Controller/CustomerVendorTurnover.pm @@ -5,6 +5,8 @@ use SL::DBUtils; use SL::DB::AccTransaction; use SL::DB::Invoice; use SL::DB::Order; +use SL::DB::EmailJournal; +use SL::DB::Letter; use SL::DB; __PACKAGE__->run_before('check_auth'); @@ -75,6 +77,7 @@ sub action_count_open_items_by_year { $self->{dun_statistic} = selectall_hashref_query($::form, $dbh, $query); $self->render('customer_vendor_turnover/count_open_items_by_year', { layout => 0 }); } + sub action_count_open_items_by_month { my ($self) = @_; @@ -99,6 +102,7 @@ sub action_count_open_items_by_month { $self->{dun_statistic} = selectall_hashref_query($::form, $dbh, $query); $self->render('customer_vendor_turnover/count_open_items_by_year', { layout => 0 }); } + sub action_turnover_by_month { my ($self) = @_; @@ -128,6 +132,7 @@ SQL $self->{turnover_statistic} = selectall_hashref_query($::form, $dbh, $query); $self->render('customer_vendor_turnover/count_turnover', { layout => 0 }); } + sub action_turnover_by_year { my ($self) = @_; @@ -233,6 +238,138 @@ sub _get_open_orders { return $self->render('customer_vendor_turnover/_list_open_orders', { output => 0 }, orders => $open_orders, title => $::locale->text('Open Orders') ); } +sub action_get_mails { + my ( $self ) = @_; + + my $dbh = SL::DB->client->dbh; + my $query; + my $cv = $::form->{id}; + + if ( $::form->{db} eq 'customer') { + $query = <render('customer_vendor_turnover/email_statistic', { layout => 0 }, emails => $emails); +} + sub _list_articles_by_invoice { } sub _list_count_articles_by_year { diff --git a/templates/webpages/customer_vendor_turnover/email_statistic.html b/templates/webpages/customer_vendor_turnover/email_statistic.html new file mode 100644 index 000000000..6fc695fec --- /dev/null +++ b/templates/webpages/customer_vendor_turnover/email_statistic.html @@ -0,0 +1,40 @@ +[%- USE T8 %] +[%- USE LxERP %] +[%- USE L %] +[%- USE HTML %] +[%- USE Dumper %] + +
+ + + + + + + + + + + + + [%- FOREACH row = emails %] + + + + + + + + + + [% END %] + +
[% 'Sent on' | $T8 %][% 'Subject' | $T8 %][% 'Record Type' | $T8 %][% 'Record Number' | $T8 %][% 'From' | $T8 %][% 'To' | $T8 %][% 'Status' | $T8 %]
[% row.sent_on | html %] + + [%- HTML.escape(row.subject) %] + [% row.type | $T8 %][% row.recordnumber | html %][% row.from %][% row.recipients %][% row.status %]
+ + + + +