From 0a6affabafd71c759c651fe60d4d228a159b86f6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 4 May 2009 11:59:18 +0000 Subject: [PATCH] =?utf8?q?Patch=20f=C3=BCr=20Bug=20878.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Department jetzt in sämtlichen OE Masken als department_id und department verfügbar. --- SL/OE.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SL/OE.pm b/SL/OE.pm index 10d718618..b72b35d20 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -34,7 +34,7 @@ package OE; -use List::Util qw(max); +use List::Util qw(max first); use SL::AM; use SL::Common; @@ -928,7 +928,8 @@ sub order_details { push(@project_ids, $form->{"globalproject_id"}) if ($form->{"globalproject_id"}); - $form->get_lists('price_factors' => 'ALL_PRICE_FACTORS'); + $form->get_lists('price_factors' => 'ALL_PRICE_FACTORS', + 'departments' => 'ALL_DEPARTMENTS'); my %price_factors; foreach my $pfac (@{ $form->{ALL_PRICE_FACTORS} }) { @@ -937,6 +938,9 @@ sub order_details { $pfac->{formatted_factor} = $form->format_amount($myconfig, $pfac->{factor}); } + # lookup department + $form->{department} = ( first { $_->{id} eq $form->{department_id} } @{ $form->{ALL_DEPARTMENTS} } )->{description} || ''; + # sort items by partsgroup for $i (1 .. $form->{rowcount}) { $partsgroup = ""; -- 2.20.1