From: Sven Schöling Date: Tue, 5 May 2009 08:59:28 +0000 (+0000) Subject: sicherer Algorithmus. X-Git-Tag: release-2.6.0beta2~55 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=66280da7f9a3536251910aa6053724ea63d8ac5e;p=kivitendo-erp.git sicherer Algorithmus. --- diff --git a/SL/OE.pm b/SL/OE.pm index 924ebd6d5..a2759f066 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -938,8 +938,11 @@ sub order_details { } # lookup department - # hallo sven, ich bekomme hier einen internal server error, sehr wahrscheinlich weil bei meinen mandanten keine Abteilungen konfiguriert sind - # $form->{department} = ( first { $_->{id} eq $form->{department_id} } @{ $form->{ALL_DEPARTMENTS} } )->{description} || ''; + foreach my $dept (@{ $form->{ALL_DEPARTMENTS} }) { + next unless $dept->{id} eq $form->{department_id}; + $form->{department} = $dept->{description}; + last; + } # sort items by partsgroup for $i (1 .. $form->{rowcount}) {