From: Sven Schöling Date: Tue, 14 Aug 2012 10:50:02 +0000 (+0200) Subject: employees direkt in der Datenbank sortieren. X-Git-Tag: release-3.0.0beta1~297^2~3 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ab598b028f26f38fd48a12670ba836f1a8998623;p=kivitendo-erp.git employees direkt in der Datenbank sortieren. --- diff --git a/SL/Form.pm b/SL/Form.pm index a7ed01b73..70d3a6550 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -2576,7 +2576,8 @@ sub all_vc { # setup sales contacts $query = qq|SELECT e.id, e.name FROM employee e - WHERE (e.sales = '1') AND (NOT e.id = ?)|; + WHERE (e.sales = '1') AND (NOT e.id = ?) + ORDER BY name|; $self->{all_employees} = selectall_hashref_query($self, $dbh, $query, $self->{employee_id}); # this is for self @@ -2584,11 +2585,6 @@ sub all_vc { { id => $self->{employee_id}, name => $self->{employee} }); - # sort the whole thing - @{ $self->{all_employees} } = - sort { $a->{name} cmp $b->{name} } @{ $self->{all_employees} }; - - # prepare query for departments $query = qq|SELECT id, description FROM department