Revision 59b35cf6
Von Moritz Bunkus vor fast 10 Jahren hinzugefügt
SL/Controller/FinancialControllingReport.pm | ||
---|---|---|
76 | 76 |
sub => sub { $_[0]->globalproject_id ? $_[0]->globalproject->project_type->description : '' } }, |
77 | 77 |
); |
78 | 78 |
|
79 |
map { $column_defs{$_}->{text} ||= $::locale->text( $self->models->get_sort_spec->{$_}->{title} ) } keys %column_defs;
|
|
80 |
map { $column_defs{$_}->{align} = 'right' } @{ $self->{number_columns} };
|
|
79 |
$column_defs{$_}->{text} ||= $::locale->text( $self->models->get_sort_spec->{$_}->{title} ) for keys %column_defs;
|
|
80 |
$column_defs{$_}->{align} = 'right' for @{ $self->{number_columns} };
|
|
81 | 81 |
|
82 | 82 |
$report->set_options( |
83 | 83 |
std_column_visibility => 1, |
... | ... | |
181 | 181 |
my ($self) = @_; |
182 | 182 |
my $modify_data = sub { |
183 | 183 |
my ($data) = @_; |
184 |
map { $data->{$_}->{data} = defined $data->{$_}->{data} ? int($data->{$_}->{data}) : '' } grep { m/_p$/ } @{ $self->{number_columns} };
|
|
185 |
map { $data->{$_}->{data} = $::form->format_amount(\%::myconfig, $data->{$_}->{data}, 2) } grep { !m/_p$/ } @{ $self->{number_columns} };
|
|
184 |
$data->{$_}->{data} = defined $data->{$_}->{data} ? int($data->{$_}->{data}) : '' for grep { m/_p$/ } @{ $self->{number_columns} };
|
|
185 |
$data->{$_}->{data} = $::form->format_amount(\%::myconfig, $data->{$_}->{data}, 2) for grep { !m/_p$/ } @{ $self->{number_columns} };
|
|
186 | 186 |
}; |
187 | 187 |
|
188 | 188 |
return $self->report_generator_list_objects(report => $self->{report}, objects => $self->{orders}, data_callback => $modify_data); |
Auch abrufbar als: Unified diff
Finanzcontrollingbericht refactoring: map nicht nur für Seiteneffekte nutzen