From 59b35cf62c87c34b6b8031cec256a295e426dcb4 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 25 Nov 2014 09:07:56 +0100 Subject: [PATCH] =?utf8?q?Finanzcontrollingbericht=20refactoring:=20map=20?= =?utf8?q?nicht=20nur=20f=C3=BCr=20Seiteneffekte=20nutzen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/FinancialControllingReport.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SL/Controller/FinancialControllingReport.pm b/SL/Controller/FinancialControllingReport.pm index 123be8573..50760a5f7 100644 --- a/SL/Controller/FinancialControllingReport.pm +++ b/SL/Controller/FinancialControllingReport.pm @@ -76,8 +76,8 @@ sub prepare_report { sub => sub { $_[0]->globalproject_id ? $_[0]->globalproject->project_type->description : '' } }, ); - map { $column_defs{$_}->{text} ||= $::locale->text( $self->models->get_sort_spec->{$_}->{title} ) } keys %column_defs; - map { $column_defs{$_}->{align} = 'right' } @{ $self->{number_columns} }; + $column_defs{$_}->{text} ||= $::locale->text( $self->models->get_sort_spec->{$_}->{title} ) for keys %column_defs; + $column_defs{$_}->{align} = 'right' for @{ $self->{number_columns} }; $report->set_options( std_column_visibility => 1, @@ -181,8 +181,8 @@ sub list_objects { my ($self) = @_; my $modify_data = sub { my ($data) = @_; - map { $data->{$_}->{data} = defined $data->{$_}->{data} ? int($data->{$_}->{data}) : '' } grep { m/_p$/ } @{ $self->{number_columns} }; - map { $data->{$_}->{data} = $::form->format_amount(\%::myconfig, $data->{$_}->{data}, 2) } grep { !m/_p$/ } @{ $self->{number_columns} }; + $data->{$_}->{data} = defined $data->{$_}->{data} ? int($data->{$_}->{data}) : '' for grep { m/_p$/ } @{ $self->{number_columns} }; + $data->{$_}->{data} = $::form->format_amount(\%::myconfig, $data->{$_}->{data}, 2) for grep { !m/_p$/ } @{ $self->{number_columns} }; }; return $self->report_generator_list_objects(report => $self->{report}, objects => $self->{orders}, data_callback => $modify_data); -- 2.20.1