X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fdo.pl;h=b4ccfe3c49748a033ab0aba5ee6003f614d1277e;hb=1a500c31f23ea9fef89b35af688249f18afeb939;hp=c88f3b0ecf6a7fd43ba38789707c1f64412e0573;hpb=94e11003809e9090514026a733e58e72e636a6bb;p=kivitendo-erp.git diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index c88f3b0ec..b4ccfe3c4 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -409,7 +409,7 @@ sub orders { ($form->{ $form->{vc} }, $form->{"${form->{vc}}_id"}) = split(/--/, $form->{ $form->{vc} }); - $form->{sort} ||= 'transdate'; + report_generator_set_default_sort('transdate', 1); DO->transactions(); @@ -456,7 +456,8 @@ sub orders { ); foreach my $name (qw(id transdate donumber ordnumber name employee shipvia)) { - $column_defs{$name}->{link} = $href . "&sort=$name"; + my $sortdir = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir}; + $column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir"; } $form->{"l_type"} = "Y"; @@ -469,7 +470,7 @@ sub orders { $report->set_export_options('orders', @hidden_variables); - $report->set_sort_indicator($form->{sort}, 1); + $report->set_sort_indicator($form->{sort}, $form->{sortdir}); my @options; if ($form->{customer}) {