From: Sven Schöling Date: Mon, 4 May 2009 11:59:18 +0000 (+0000) Subject: Patch für Bug 878. X-Git-Tag: release-2.6.0beta2~80 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=0a6affabafd71c759c651fe60d4d228a159b86f6;p=kivitendo-erp.git Patch für Bug 878. Department jetzt in sämtlichen OE Masken als department_id und department verfügbar. --- 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 = "";