X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FSellPriceInformation.pm;h=b0e96c3aff64f3081299c252fc1898e37b1dca1e;hb=9c19433144efc5b50d90a969aa9ac6ea65b2dbbf;hp=8e0c52d86b16c57d5a886c896210debe8afd0f5e;hpb=49ec3bd3b6897c45d904faa85cfa14a730610935;p=kivitendo-erp.git diff --git a/SL/Controller/SellPriceInformation.pm b/SL/Controller/SellPriceInformation.pm index 8e0c52d86..b0e96c3af 100644 --- a/SL/Controller/SellPriceInformation.pm +++ b/SL/Controller/SellPriceInformation.pm @@ -20,7 +20,7 @@ sub action_list { ); my $db_args = $self->setup_for_list(%list_params); - $self->{pages} = SL::DB::Manager::OrderItem->paginate(%list_params, args => $db_args, per_page => 10); + $self->{pages} = SL::DB::Manager::OrderItem->paginate(%list_params, args => $db_args, per_page => 5); my $bottom = $::form->parse_html_template('price_information/report_bottom', { SELF => $self }); @@ -34,7 +34,7 @@ sub action_list { my $orderitems = SL::DB::Manager::OrderItem->get_all(%$db_args); - $self->report_generator_list_objects(report => $self->{report}, objects => $orderitems, options => { no_layout => 1 }); + $self->report_generator_list_objects(report => $self->{report}, objects => $orderitems, layout => 0, header => 0); } # private functions @@ -96,6 +96,9 @@ sub prepare_report { my $report = SL::ReportGenerator->new(\%::myconfig, $::form); $self->{report} = $report; + my $title = $::locale->text('Sales Price information'); + $title .= ': ' . $::locale->text($::form->{filter}->{order}{type}) if $::form->{filter}->{order}{type}; + my @columns = qw(transdate ordnumber customer ship qty sellprice discount amount); my @visible = qw(transdate ordnumber customer ship qty sellprice discount amount); my @sortable = qw(transdate ordnumber customer sellprice discount ); @@ -121,7 +124,7 @@ sub prepare_report { %{ $params{report_generator_options} || {} }, output_format => 'HTML', top_info_text => $self->displayable_filter($::form->{filter}), - title => $::locale->text('Sales Price information'), + title => $title, ); $report->set_options_from_form; } @@ -162,9 +165,8 @@ sub displayable_filter { my $column_defs = $self->column_defs; my @texts; - push @texts, [ $::locale->text('Type'), $::locale->text($filter->{order}{type}) ] if $filter->{order}{type}; push @texts, [ $::locale->text('Sort By'), $column_defs->{$self->{sort_by}}{text} ] if $column_defs->{$self->{sort_by}}{text}; - push @texts, [ $::locale->text('Page'), $::locale->text($self->{pages}{cur}) ] if $self->{pages}{cur} != 1; + push @texts, [ $::locale->text('Page'), $::locale->text($self->{pages}{cur}) ] if $self->{pages}{cur} > 1; return join '; ', map { "$_->[0]: $_->[1]" } @texts; }