$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) : ();
[%- 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 %]