Revision 23c7245a
Von Moritz Bunkus vor mehr als 16 Jahren hinzugefügt
SL/DO.pm | ||
---|---|---|
142 | 142 |
"transaction_description" => "dord.transaction_description" |
143 | 143 |
); |
144 | 144 |
|
145 |
my $sortoder = "dord.id"; |
|
145 |
my $sortdir = $form->{sortdir} ? 'ASC' : 'DESC'; |
|
146 |
my $sortorder = "dord.id"; |
|
146 | 147 |
if ($form->{sort} && grep($form->{sort}, keys(%allowed_sort_columns))) { |
147 | 148 |
$sortorder = $allowed_sort_columns{$form->{sort}}; |
148 | 149 |
} |
149 | 150 |
|
150 |
$query .= qq| ORDER by | . $sortorder; |
|
151 |
$query .= qq| ORDER by | . $sortorder . " $sortdir";
|
|
151 | 152 |
|
152 | 153 |
$form->{DO} = selectall_hashref_query($form, $dbh, $query, @values); |
153 | 154 |
|
bin/mozilla/do.pl | ||
---|---|---|
409 | 409 |
|
410 | 410 |
($form->{ $form->{vc} }, $form->{"${form->{vc}}_id"}) = split(/--/, $form->{ $form->{vc} }); |
411 | 411 |
|
412 |
$form->{sort} ||= 'transdate'; |
|
412 |
$form->{sort} ||= 'transdate'; |
|
413 |
$form->{sortdir} = 1 unless (defined $form->{sortdir}); |
|
414 |
$form->{sortdir} = $form->{sortdir} ? 1 : 0; |
|
413 | 415 |
|
414 | 416 |
DO->transactions(); |
415 | 417 |
|
... | ... | |
456 | 458 |
); |
457 | 459 |
|
458 | 460 |
foreach my $name (qw(id transdate donumber ordnumber name employee shipvia)) { |
459 |
$column_defs{$name}->{link} = $href . "&sort=$name"; |
|
461 |
my $sortdir = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir}; |
|
462 |
$column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir"; |
|
460 | 463 |
} |
461 | 464 |
|
462 | 465 |
$form->{"l_type"} = "Y"; |
... | ... | |
469 | 472 |
|
470 | 473 |
$report->set_export_options('orders', @hidden_variables); |
471 | 474 |
|
472 |
$report->set_sort_indicator($form->{sort}, 1);
|
|
475 |
$report->set_sort_indicator($form->{sort}, $form->{sortdir});
|
|
473 | 476 |
|
474 | 477 |
my @options; |
475 | 478 |
if ($form->{customer}) { |
Auch abrufbar als: Unified diff
Sortierung in Berichten über Lieferscheine auch auf- und absteigbar sortierbar gemacht.