Revision 1ade8550
Von Bernd Bleßmann vor fast 12 Jahren hinzugefügt
SL/CT.pm | ||
---|---|---|
635 | 635 |
"salesman" => "e.name" |
636 | 636 |
); |
637 | 637 |
|
638 |
$form->{sort} ||= "name"; |
|
638 | 639 |
my $sortorder; |
639 | 640 |
if ( $join_records ) { |
640 | 641 |
# in UNION case order by hash key, e.g. salesman |
641 | 642 |
# the UNION created an implicit select around the result |
642 |
$sortorder = $form->{sort} && $allowed_sort_columns{$form->{sort}} ? $form->{sort} : "name";
|
|
643 |
$sortorder = $allowed_sort_columns{$form->{sort}} ? $form->{sort} : "name"; |
|
643 | 644 |
} else { |
644 | 645 |
# in not UNION case order by hash value, e.g. e.name |
645 |
$sortorder = $form->{sort} && $allowed_sort_columns{$form->{sort}} ? $allowed_sort_columns{$form->{sort}} : "ct.name";
|
|
646 |
$sortorder = $allowed_sort_columns{$form->{sort}} ? $allowed_sort_columns{$form->{sort}} : "ct.name"; |
|
646 | 647 |
}; |
647 |
$form->{sort} = $sortorder; |
|
648 | 648 |
my $sortdir = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC'; |
649 | 649 |
|
650 | 650 |
if ($sortorder !~ /(business|id)/ && !$join_records) { |
Auch abrufbar als: Unified diff
Kundenbericht/Lieferantenbericht: Wieder richtig Sortieren können.
Ist im commit e5e2493f45a28623c056023159f4166c2dac63a0 kaputt gegangen.