Zeiterfassung: Bericht: Filter f. Auftragsnummer, Projekt und Beschreibung
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Fri, 7 May 2021 09:41:06 +0000 (11:41 +0200)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Fri, 7 May 2021 09:41:06 +0000 (11:41 +0200)
SL/Controller/TimeRecording.pm
templates/webpages/time_recording/_filter.html

index 5c442cc..45c58cd 100644 (file)
@@ -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')     ],
   );
 
index 4825999..e2e6415 100644 (file)
@@ -1,5 +1,6 @@
 [%- USE T8 %]
 [%- USE L %]
+[%- USE P %]
 [%- USE LxERP %]
 [%- USE HTML %]
 <form action='controller.pl' method='post' id='filter_form'>
     <th align="right">[% 'Customer Number' | $T8 %]</th>
     <td>[% L.input_tag('filter.customer.customernumber:substr::ilike', filter.customer.customernumber_substr__ilike, size = 20) %]</td>
   </tr>
+  <tr>
+    <th align="right">[% 'Order Number' | $T8 %]</th>
+    <td>[% L.input_tag('filter.order.ordnumber:substr::ilike', filter.order.ordnumber_substr__ilike, size = 20) %]</td>
+  </tr>
+  <tr>
+    <th align="right">[% 'Project' | $T8 %]</th>
+    <td>[% P.project.picker('filter.project_id', filter.project_id, active="both", valid="both", size = 20) %]</td>
+  </tr>
+  <tr>
+    <th align="right">[% 'Description' | $T8 %]</th>
+    <td>[% L.input_tag('filter.description:substr::ilike', filter.description_substr__ilike, size = 20) %]</td>
+  </tr>
 
   [%- IF SELF.can_view_all -%]
   <tr>