Finanzcontrollingbericht: Filtern nach Projekttyp
authorSven Schöling <s.schoeling@linet-services.de>
Tue, 17 Dec 2013 13:35:42 +0000 (14:35 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Tue, 17 Dec 2013 13:35:42 +0000 (14:35 +0100)
SL/Controller/FinancialControllingReport.pm
templates/webpages/financial_controlling_report/_filter.html

index d44936d..988d619 100644 (file)
@@ -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;
index 0e93ce3..95e7bd7 100644 (file)
    <th align="right">[% 'Project Number' | $T8 %]</th>
    <td>[% L.input_tag('filter.globalproject.projectnumber:substr::ilike', filter.globalproject.projectnumber_substr__ilike, size = 20) %]</td>
   </tr>
+  <tr>
+   <th align="right">[% 'Project Type' | $T8 %]</th>
+   <td>[% L.select_tag('filter.globalproject.project_type_id', SELF.project_types, default=filter.globalproject.project_type_id, title_key='description', with_empty=1) %]</td>
+  </tr>
   <tr>
    <th align="right">[% 'Order Date' | $T8 %] [% 'From Date' | $T8 %]</th>
    <td>[% L.date_tag('filter.transdate:date::ge', filter.transdate_date__ge, cal_align = 'BR') %]</td>