$report->set_columns(%$column_defs);
$report->set_column_order(@columns);
$report->set_options(allow_pdf_export => 0, allow_csv_export => 0);
- $report->set_sort_indicator(%params);
+ $report->set_sort_indicator($self->{sort_by}, $self->{sort_dir});
$report->set_export_options(@{ $params{report_generator_export_options} || [] });
$report->set_options(
%{ $params{report_generator_options} || {} },
orddate => [ 'order.orddate' ],
sellprice => [ 'sellprice' ],
discount => [ 'discount' ],
- transdate => [ 'transdate::date', 'order.reqdate' ],
+ transdate => [ 'orderitems.transdate::date', 'order.reqdate' ],
},
default => [ 'position', 1 ],
nulls => { }
my $self = shift;
return URI->new($ENV{HTTP_REFERER})->canonical() if $ENV{HTTP_X_FORWARDED_FOR};
+ return URI->new if !$ENV{REQUEST_URI}; # for testing
my $scheme = $ENV{HTTPS} && (lc $ENV{HTTPS} eq 'on') ? 'https' : 'http';
- my $port = $ENV{SERVER_PORT} || '';
+ my $port = $ENV{SERVER_PORT};
$port = undef if (($scheme eq 'http' ) && ($port == 80))
|| (($scheme eq 'https') && ($port == 443));
);
$self->{favicon} ||= "favicon.ico";
- $self->{titlebar} = join ' - ', grep $_, $self->{title}, $self->{login}, $::myconfig{dbname}, $self->{version} if $self->{title};
+ $self->{titlebar} = join ' - ', grep $_, $self->{title}, $self->{login}, $::myconfig{dbname}, $self->{version} if $self->{title} || !$self->{titlebar};
# build includes
if ($self->{refresh_url} || $self->{refresh_time}) {
{ name => "Perl::Tags", url => "http://search.cpan.org/~osfameron/", debian => 'libperl-tags-perl' },
{ name => "Test::Deep", url => "http://search.cpan.org/~rjbs/", debian => 'libtest-deep-perl' },
{ name => "Test::Exception", url => "http://search.cpan.org/~adie/", debian => 'libtest-exception-perl' },
- { name => "Test::Deep", url => "http://search.cpan.org/~bdfoy/", debian => 'libtest-output-perl' },
+ { name => "Test::Output", url => "http://search.cpan.org/~bdfoy/", debian => 'libtest-output-perl' },
{ name => "GD", version => '2.00', url => "http://search.cpan.org/~lds/", debian => 'libgd-perl' },
);
my $form = $main::form;
my %myconfig = %main::myconfig;
+ $depth ||= 0;
+
die if ($depth * 1 > 5);
my @menuorder = $menu->access_control(\%myconfig, $parent);
$parent .= "--" if ($parent);
+ $parent ||= '';
foreach my $name (@menuorder) {
substr($name, 0, length($parent), "");
my @menu = ();
- if ($menulevel eq "") {
+ if (!$menulevel) {
@menu = grep { !/--/ } @{ $self->{ORDER} };
} else {
@menu = grep { /^${menulevel}--/ } @{ $self->{ORDER} };
}
sub uri_decode {
- my ($str) = @_;
+ my $str = $_[0] || '';
$str =~ tr/+/ /;
$str =~ s/\\$//;