ActionBar: ReportGenerator nutzt per Default nun die ActionBar
authorMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 18 Jan 2017 15:25:31 +0000 (16:25 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 28 Feb 2017 09:44:02 +0000 (10:44 +0100)
19 files changed:
SL/Controller/DeliveryPlan.pm
SL/Controller/DeliveryValueReport.pm
SL/Controller/FinancialControllingReport.pm
SL/Controller/Helper/ReportGenerator.pm
SL/Controller/Inventory.pm
SL/Controller/Letter.pm
SL/Controller/PriceRule.pm
SL/Controller/Project.pm
SL/Controller/RequirementSpec.pm
SL/Controller/YearEndTransactions.pm
SL/ReportGenerator.pm
bin/mozilla/ar.pl
bin/mozilla/ct.pl
bin/mozilla/dn.pl
bin/mozilla/do.pl
bin/mozilla/gl.pl
bin/mozilla/ic.pl
bin/mozilla/oe.pl
bin/mozilla/wh.pl

index 32939e0..16991cf 100644 (file)
@@ -42,7 +42,7 @@ sub action_list {
   my $orderitems = $self->models->get;
   $self->calc_qtys($orderitems);
   $self->setup_list_action_bar;
-  $self->report_generator_list_objects(report => $self->{report}, objects => $orderitems, action_bar => 1);
+  $self->report_generator_list_objects(report => $self->{report}, objects => $orderitems);
 }
 
 # private functions
index 874b8a7..6af57e8 100644 (file)
@@ -56,7 +56,7 @@ sub action_list {
   my $orderitems = $self->models->get;
   $self->calc_qtys_price($orderitems);
   $self->setup_list_action_bar;
-  $self->report_generator_list_objects(report => $self->{report}, objects => $orderitems, action_bar => 1);
+  $self->report_generator_list_objects(report => $self->{report}, objects => $orderitems);
 }
 
 sub prepare_report {
index ab11925..7b392f1 100644 (file)
@@ -206,7 +206,7 @@ sub list_objects {
     $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, action_bar => 1);
+  return $self->report_generator_list_objects(report => $self->{report}, objects => $self->orders, data_callback => $modify_data);
 }
 
 sub make_filter_summary {
index 20ab8c3..5a83be4 100644 (file)
@@ -141,12 +141,12 @@ sub report_generator_list_objects {
   }
 
   my %options            = %{ $params{options} || {} };
-  $options{action_bar} //= $params{action_bar};
+  $options{action_bar} //= $params{action_bar} // 1;
 
   if ($params{layout}) {
     return $params{report}->generate_with_headers(%options);
   } else {
-    my $html = $params{report}->generate_html_content(%options);
+    my $html = $params{report}->generate_html_content(action_bar => 0, %options);
     $self->render(\$html , { layout => 0, process => 0 });
   }
 }
index b2dccb1..102cc31 100644 (file)
@@ -367,7 +367,7 @@ sub action_usage {
 
       $report->set_options('raw_bottom_info_text' => $self->render('inventory/report_bottom', { output => 0 }) );
   }
-  $report->generate_with_headers(action_bar => 1);
+  $report->generate_with_headers();
 
   $main::lxdebug->leave_sub();
 
index ca739cf..ed48f41 100644 (file)
@@ -176,7 +176,7 @@ sub action_list {
   $self->prepare_report;
 
   my $letters = $self->models->get;
-  $self->report_generator_list_objects(report => $self->{report}, objects => $letters, action_bar => 1);
+  $self->report_generator_list_objects(report => $self->{report}, objects => $letters);
 
 }
 
index 3b1c8c2..2723d47 100644 (file)
@@ -38,7 +38,7 @@ sub action_list {
 
   $self->prepare_report;
 
-  $self->report_generator_list_objects(report => $self->{report}, objects => $price_rules, $::form->{inline} ? (layout => 0, header => 0) : (action_bar => 1));
+  $self->report_generator_list_objects(report => $self->{report}, objects => $price_rules, $::form->{inline} ? (layout => 0, header => 0) : ());
 }
 
 sub action_new {
index 21b3d82..59e1034 100644 (file)
@@ -65,7 +65,7 @@ sub action_list {
 
   $self->prepare_report;
 
-  $self->report_generator_list_objects(report => $self->{report}, objects => $self->models->get, action_bar => 1);
+  $self->report_generator_list_objects(report => $self->{report}, objects => $self->models->get);
 }
 
 sub action_new {
index d70cd2d..ecc8e32 100644 (file)
@@ -55,7 +55,7 @@ sub action_list {
 
   $self->_setup_search_action_bar;
   $self->prepare_report;
-  $self->report_generator_list_objects(report => $self->{report}, objects => $self->models->get, action_bar => 1);
+  $self->report_generator_list_objects(report => $self->{report}, objects => $self->models->get);
 }
 
 sub action_new {
index 4a9f06c..cab8515 100644 (file)
@@ -56,7 +56,7 @@ sub action_list {
   );
 
   $self->setup_list_action_bar;
-  $report->generate_with_headers(action_bar => 1);
+  $report->generate_with_headers();
   $main::lxdebug->leave_sub();
 }
 
index 36a81f3..a62f0e4 100644 (file)
@@ -447,6 +447,9 @@ sub setup_action_bar {
 
 sub generate_html_content {
   my ($self, %params) = @_;
+
+  $params{action_bar} //= 1;
+
   my $variables = $self->prepare_html_content(%params);
 
   $self->setup_action_bar($params{action_bar}, $variables) if $params{action_bar};
index a1a7635..408eb4e 100644 (file)
@@ -1201,7 +1201,7 @@ sub ar_transactions {
   $::request->layout->add_javascripts('kivi.MassInvoiceCreatePrint.js');
   setup_ar_transactions_action_bar(num_rows => scalar(@{ $form->{AR} }));
 
-  $report->generate_with_headers(action_bar => 1);
+  $report->generate_with_headers();
 
   $main::lxdebug->leave_sub();
 }
index c2b2bfd..ba2a86a 100644 (file)
@@ -301,7 +301,7 @@ sub list_names {
   }
 
   setup_ct_list_names_action_bar();
-  $report->generate_with_headers(action_bar => 1);
+  $report->generate_with_headers();
 
   $main::lxdebug->leave_sub();
 }
@@ -432,7 +432,7 @@ sub list_contacts {
     $report->add_data($row);
   }
 
-  $report->generate_with_headers(action_bar => 1);
+  $report->generate_with_headers();
 
   $::lxdebug->leave_sub;
 }
index c202279..37c7ef6 100644 (file)
@@ -453,7 +453,7 @@ sub show_dunning {
   $report->set_options_from_form();
 
   setup_dn_show_dunning_action_bar();
-  $report->generate_with_headers(action_bar => 1);
+  $report->generate_with_headers();
 
   $main::lxdebug->leave_sub();
 
index 0263876..07988db 100644 (file)
@@ -845,7 +845,7 @@ sub orders {
 
   setup_do_orders_action_bar();
 
-  $report->generate_with_headers(action_bar => 1);
+  $report->generate_with_headers();
 
   $main::lxdebug->leave_sub();
 }
index f0cd92b..0776b75 100644 (file)
@@ -634,7 +634,7 @@ sub generate_report {
 
   setup_gl_transactions_action_bar(num_rows => scalar(@{$form->{GL}}));
 
-  $report->generate_with_headers(action_bar => 1);
+  $report->generate_with_headers();
 
   $main::lxdebug->leave_sub();
 }
index b1cb02b..d6a67c4 100644 (file)
@@ -588,7 +588,7 @@ sub generate_report {
   }
 
   setup_ic_generate_report_action_bar();
-  $report->generate_with_headers(action_bar => 1);
+  $report->generate_with_headers();
 
   $lxdebug->leave_sub();
 }    #end generate_report
index dccfccb..b024853 100644 (file)
@@ -1261,7 +1261,7 @@ sub orders {
   $report->add_data(create_subtotal_row(\%totals, \@columns, \%column_alignment, \@subtotal_columns, 'listtotal'));
 
   setup_oe_orders_action_bar();
-  $report->generate_with_headers(action_bar => 1);
+  $report->generate_with_headers();
 
   $main::lxdebug->leave_sub();
 }
index 214a26a..a729e37 100644 (file)
@@ -740,7 +740,7 @@ sub generate_journal {
       $report->set_options('raw_bottom_info_text' => $form->parse_html_template('common/paginate',
                                                             { 'pages' => $pages , 'base_url' => $href.'&sort='.$form->{sort}.'&order='.$form->{order}}) );
   }
-  $report->generate_with_headers(action_bar => 1);
+  $report->generate_with_headers();
 
   $main::lxdebug->leave_sub();
 }
@@ -973,7 +973,7 @@ sub generate_report {
                                                                               {'pages' => $pages , 'base_url' => $href}) );
   }
 
-  $report->generate_with_headers(action_bar => 1);
+  $report->generate_with_headers();
 
   $main::lxdebug->leave_sub();
 }