From: Bernd Bleßmann Date: Wed, 24 May 2017 14:41:52 +0000 (+0200) Subject: Angebot/Auftrag: Abteilung als Variable in Druckvorlage wieder verwendbar machen X-Git-Tag: release-3.5.4~1070 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=01591fa72e7ca4af7143a573170a78e431728c92;p=kivitendo-erp.git Angebot/Auftrag: Abteilung als Variable in Druckvorlage wieder verwendbar machen Ging in commit dd2ee66b1d04c3644c48c32b33673463af223077 "Aufträge - Abteilung per ALL_DEPARTMENTS und L.select_tag" kaputt. behebt #262 (redmine) --- diff --git a/SL/OE.pm b/SL/OE.pm index 64cab296c..a0a0abfc8 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -1279,7 +1279,6 @@ sub order_details { push(@project_ids, $form->{"globalproject_id"}) if ($form->{"globalproject_id"}); $form->get_lists('price_factors' => 'ALL_PRICE_FACTORS'); - $form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all; my %price_factors; foreach my $pfac (@{ $form->{ALL_PRICE_FACTORS} }) { @@ -1607,6 +1606,7 @@ sub order_details { $form->{username} = $myconfig->{name}; + $form->{department} = SL::DB::Manager::Department->find_by(id => $form->{department_id})->description if $form->{department_id}; $form->{delivery_term} = SL::DB::Manager::DeliveryTerm->find_by(id => $form->{delivery_term_id} || undef); $form->{delivery_term}->description_long($form->{delivery_term}->translated_attribute('description_long', $form->{language_id})) if $form->{delivery_term} && $form->{language_id};