X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/d561122a4624918cb3157b8f8b1839464e051c1a..34366eda748e1198b8b2ead0c3fffd8edba9f23d:/SL/OE.pm 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}) {