From 15f442988d4e409ad742c6457db26ed96948aafc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 6 Nov 2015 12:22:29 +0100 Subject: [PATCH] Auftrags-Controller: Abteilungen --- SL/Controller/Order.pm | 1 + templates/webpages/order/tabs/basic_data.html | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index ed84673b2..aaa31cc19 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -642,6 +642,7 @@ sub _pre_render { my ($self) = @_; $self->{all_taxzones} = SL::DB::Manager::TaxZone->get_all_sorted(); + $self->{all_departments} = SL::DB::Manager::Department->get_all_sorted(); $self->{all_employees} = SL::DB::Manager::Employee->get_all(where => [ or => [ id => $self->order->employee_id, deleted => 0 ] ], sort_by => 'name'); diff --git a/templates/webpages/order/tabs/basic_data.html b/templates/webpages/order/tabs/basic_data.html index c44e64681..d66c9105e 100644 --- a/templates/webpages/order/tabs/basic_data.html +++ b/templates/webpages/order/tabs/basic_data.html @@ -41,6 +41,15 @@ [% L.select_tag('order.taxzone_id', SELF.all_taxzones, default=SELF.order.taxzone_id, title_key='description', style='width: 300px', class='recalc') %] +[%- IF SELF.all_departments.size %] + + [% 'Department' | $T8 %] + + [% L.select_tag('order.department_id', SELF.all_departments, default=SELF.order.department_id, title_key='description', with_empty=1, style='width:300px') %] + + +[%- END %] + [% 'Shipping Point' | $T8 %] [% L.input_tag('order.shippingpoint', SELF.order.shippingpoint, style='width: 300px') %] -- 2.20.1