From 7079d6838448b1bd742191ccce29cfba382e4cc8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 7 May 2021 11:41:06 +0200 Subject: [PATCH] Zeiterfassung: Bericht: Filter f. Auftragsnummer, Projekt und Beschreibung --- SL/Controller/TimeRecording.pm | 10 +++++++--- templates/webpages/time_recording/_filter.html | 13 +++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/SL/Controller/TimeRecording.pm b/SL/Controller/TimeRecording.pm index 5c442cc4c..45c58cd44 100644 --- a/SL/Controller/TimeRecording.pm +++ b/SL/Controller/TimeRecording.pm @@ -321,13 +321,17 @@ sub make_filter_summary { my $filter = $::form->{filter} || {}; my @filter_strings; - my $staff_member = $filter->{staff_member_id} ? SL::DB::Employee->new(id => $filter->{staff_member_id})->load->safe_name : ''; + my $staff_member = $filter->{staff_member_id} ? SL::DB::Employee->new(id => $filter->{staff_member_id})->load->safe_name : ''; + my $project = $filter->{project_id} ? SL::DB::Project->new (id => $filter->{project_id}) ->load->displayable_name : ''; my @filters = ( - [ $filter->{"date:date::ge"}, t8('From Date') ], - [ $filter->{"date:date::le"}, t8('To Date') ], + [ $filter->{"date:date::ge"}, t8('From Date') ], + [ $filter->{"date:date::le"}, t8('To Date') ], [ $filter->{"customer"}->{"name:substr::ilike"}, t8('Customer') ], [ $filter->{"customer"}->{"customernumber:substr::ilike"}, t8('Customer Number') ], + [ $filter->{"order"}->{"ordnumber:substr::ilike"}, t8('Order Number') ], + [ $project, t8('Project') ], + [ $filter->{"description:substr::ilike"}, t8('Description') ], [ $staff_member, t8('Mitarbeiter') ], ); diff --git a/templates/webpages/time_recording/_filter.html b/templates/webpages/time_recording/_filter.html index 482599987..e2e6415e1 100644 --- a/templates/webpages/time_recording/_filter.html +++ b/templates/webpages/time_recording/_filter.html @@ -1,5 +1,6 @@ [%- USE T8 %] [%- USE L %] +[%- USE P %] [%- USE LxERP %] [%- USE HTML %]
@@ -26,6 +27,18 @@ [% 'Customer Number' | $T8 %] [% L.input_tag('filter.customer.customernumber:substr::ilike', filter.customer.customernumber_substr__ilike, size = 20) %] + + [% 'Order Number' | $T8 %] + [% L.input_tag('filter.order.ordnumber:substr::ilike', filter.order.ordnumber_substr__ilike, size = 20) %] + + + [% 'Project' | $T8 %] + [% P.project.picker('filter.project_id', filter.project_id, active="both", valid="both", size = 20) %] + + + [% 'Description' | $T8 %] + [% L.input_tag('filter.description:substr::ilike', filter.description_substr__ilike, size = 20) %] + [%- IF SELF.can_view_all -%] -- 2.20.1