From a84943da59d4910ad5baef33804daf97fc5cceb2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Mon, 17 Oct 2011 13:40:03 +0200 Subject: [PATCH] =?utf8?q?Stammdaten=20->=20Berichte=20->=20Kunden=20mit?= =?utf8?q?=20Kundentyp.=20Die=20anschlie=C3=9Fende=20Sortierung=20nach=20K?= =?utf8?q?undentyp=20liefert=20eine=20Fehlermeldung,=20da=20ein=20'order?= =?utf8?q?=20by=20lower(business)'=20eine=20SQL-Fehlermeldung=20wirft=20(c?= =?utf8?q?t.business=5Fid=20AS=20business).=20Entsprechend=20die=20Abfrage?= =?utf8?q?=20erweitert,=20sodass=20ein=20'order=20by=20business'=20analog?= =?utf8?q?=20wie=20bei=20quonumber=20etc=20passiert.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/CT.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SL/CT.pm b/SL/CT.pm index 467fb0841..24bce2807 100644 --- a/SL/CT.pm +++ b/SL/CT.pm @@ -696,7 +696,7 @@ sub search { $form->{sort} = $sortorder; my $sortdir = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC'; - if ($sortorder ne 'id' && 1 >= scalar grep { $form->{$_} } qw(l_ordnumber l_quonumber l_invnumber)) { + if ($sortorder !~ /(business|id)/ && 1 >= scalar grep { $form->{$_} } qw(l_ordnumber l_quonumber l_invnumber )) { $sortorder = "lower($sortorder) ${sortdir}"; } else { $sortorder .= " ${sortdir}"; -- 2.20.1