From ffd06003d74a7844892fca93905556a1903a31d8 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Fri, 23 Dec 2016 09:26:49 +0100 Subject: [PATCH] Verkaufsrechnung bearbeiten - ALL_DEPARTMENTS wie andere Belegemasken --- bin/mozilla/is.pl | 3 ++- templates/webpages/is/form_header.html | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index a45adbf80..4007f8d3b 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -302,9 +302,10 @@ sub form_header { $form->get_lists("taxzones" => ($form->{id} ? "ALL_TAXZONES" : "ALL_ACTIVE_TAXZONES"), "currencies" => "ALL_CURRENCIES", "customers" => "ALL_CUSTOMERS", - "departments" => "all_departments", "price_factors" => "ALL_PRICE_FACTORS"); + $form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all; + # Projects my @old_project_ids = uniq grep { $_ } map { $_ * 1 } ($form->{"globalproject_id"}, map { $form->{"project_id_$_"} } 1..$form->{"rowcount"}); my @old_ids_cond = @old_project_ids ? (id => \@old_project_ids) : (); diff --git a/templates/webpages/is/form_header.html b/templates/webpages/is/form_header.html index 5e76f88d7..28f3f4da4 100644 --- a/templates/webpages/is/form_header.html +++ b/templates/webpages/is/form_header.html @@ -146,11 +146,11 @@ [%- END %] -[%- IF all_departments %] +[%- IF ALL_DEPARTMENTS %] [% 'Department' | $T8 %] - [% L.select_tag('department_id', all_departments, default = department_id, title_sub = \department_labels, with_empty = 1, style = 'width:250px') %] + [% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1, style = 'width:250px') %] [%- END %] -- 2.20.1