Verkaufsrechnung bearbeiten - ALL_DEPARTMENTS wie andere Belegemasken
authorG. Richardson <information@kivitendo-premium.de>
Fri, 23 Dec 2016 08:26:49 +0000 (09:26 +0100)
committerG. Richardson <information@kivitendo-premium.de>
Tue, 27 Dec 2016 12:02:25 +0000 (13:02 +0100)
bin/mozilla/is.pl
templates/webpages/is/form_header.html

index a45adbf..4007f8d 100644 (file)
@@ -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) : ();
index 5e76f88..28f3f4d 100644 (file)
   [%- END %]
           </td>
         </tr>
-[%- IF all_departments %]
+[%- IF ALL_DEPARTMENTS %]
         <tr>
           <th align="right" nowrap>[% 'Department' | $T8 %]</th>
           <td colspan="3">
-            [% 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') %]
           </td>
         </tr>
 [%- END %]