From ce213a0a7c307cd46c4aff6eb72cbdc5da6753b7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 17 Dec 2013 14:35:42 +0100 Subject: [PATCH] Finanzcontrollingbericht: Filtern nach Projekttyp --- SL/Controller/FinancialControllingReport.pm | 4 +++- templates/webpages/financial_controlling_report/_filter.html | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/SL/Controller/FinancialControllingReport.pm b/SL/Controller/FinancialControllingReport.pm index d44936d67..988d619e2 100644 --- a/SL/Controller/FinancialControllingReport.pm +++ b/SL/Controller/FinancialControllingReport.pm @@ -15,7 +15,7 @@ use SL::Controller::Helper::ReportGenerator; use SL::Locale::String; use Rose::Object::MakeMethods::Generic ( - scalar => [ qw(db_args flat_filter) ], + scalar => [ qw(db_args flat_filter project_types) ], ); __PACKAGE__->run_before(sub { $::auth->assert('sales_order_edit'); }); @@ -45,6 +45,8 @@ __PACKAGE__->make_sorted( sub action_list { my ($self) = @_; + $self->project_types(SL::DB::Manager::ProjectType->get_all_sorted); + $self->db_args($self->setup_db_args_for_list(filter => $::form->{filter})); $self->flat_filter({ map { $_->{key} => $_->{value} } $::form->flatten_variables('filter') }); $self->make_filter_summary; diff --git a/templates/webpages/financial_controlling_report/_filter.html b/templates/webpages/financial_controlling_report/_filter.html index 0e93ce388..95e7bd7ab 100644 --- a/templates/webpages/financial_controlling_report/_filter.html +++ b/templates/webpages/financial_controlling_report/_filter.html @@ -26,6 +26,10 @@ [% 'Project Number' | $T8 %] [% L.input_tag('filter.globalproject.projectnumber:substr::ilike', filter.globalproject.projectnumber_substr__ilike, size = 20) %] + + [% 'Project Type' | $T8 %] + [% L.select_tag('filter.globalproject.project_type_id', SELF.project_types, default=filter.globalproject.project_type_id, title_key='description', with_empty=1) %] + [% 'Order Date' | $T8 %] [% 'From Date' | $T8 %] [% L.date_tag('filter.transdate:date::ge', filter.transdate_date__ge, cal_align = 'BR') %] -- 2.20.1