use SL::MoreCommon;
use SL::ReportGenerator;
+use strict;
+
sub report_generator_set_default_sort {
- $lxdebug->enter_sub();
+ $main::lxdebug->enter_sub();
+
+ my $form = $main::form;
my $default_sortorder = shift;
my $default_sortdir = shift;
$form->{sortdir} = $default_sortdir unless (defined $form->{sortdir});
$form->{sortdir} = $form->{sortdir} ? 1 : 0;
- $lxdebug->leave_sub();
+ $main::lxdebug->leave_sub();
}
sub report_generator_export_as_pdf {
- $lxdebug->enter_sub();
+ $main::lxdebug->enter_sub();
+
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
+ my $locale = $main::locale;
if ($form->{report_generator_pdf_options_set}) {
my $saved_form = save_form();
report_generator_do('HTML');
}
- $lxdebug->leave_sub();
+ $main::lxdebug->leave_sub();
return;
}
print $form->parse_html_template('report_generator/pdf_export_options', { 'HIDDEN' => \@form_values,
'ALLOW_FONT_SELECTION' => $allow_font_selection, });
- $lxdebug->leave_sub();
+ $main::lxdebug->leave_sub();
}
sub report_generator_export_as_csv {
- $lxdebug->enter_sub();
+ $main::lxdebug->enter_sub();
+
+ my $form = $main::form;
+ my $locale = $main::locale;
if ($form->{report_generator_csv_options_set}) {
report_generator_do('CSV');
- $lxdebug->leave_sub();
+ $main::lxdebug->leave_sub();
return;
}
$form->header();
print $form->parse_html_template('report_generator/csv_export_options', { 'HIDDEN' => \@form_values });
- $lxdebug->leave_sub();
+ $main::lxdebug->leave_sub();
}
sub report_generator_back {
- $lxdebug->enter_sub();
+ $main::lxdebug->enter_sub();
report_generator_do('HTML');
- $lxdebug->leave_sub();
+ $main::lxdebug->leave_sub();
}
sub report_generator_do {
- $lxdebug->enter_sub();
+ $main::lxdebug->enter_sub();
my $format = shift;
+ my $form = $main::form;
+ my $locale = $main::locale;
+
my $nextsub = $form->{report_generator_nextsub};
if (!$nextsub) {
$form->error($locale->text('report_generator_nextsub is not defined.'));
call_sub($nextsub);
- $lxdebug->leave_sub();
+ $main::lxdebug->leave_sub();
}
sub report_generator_dispatcher {
- $lxdebug->enter_sub();
+ $main::lxdebug->enter_sub();
+
+ my $form = $main::form;
+ my $locale = $main::locale;
my $nextsub = $form->{report_generator_dispatch_to};
if (!$nextsub) {
call_sub($nextsub);
- $lxdebug->leave_sub();
+ $main::lxdebug->leave_sub();
}
1;