+ $form->all_departments(\%myconfig);
+ # departments
+ if (@{ $form->{all_departments} }) {
+ $form->{selectdepartment} = "<option>\n";
+
+ map { $form->{selectdepartment} .= qq|<option value="$_->{description}--$_->{id}">$_->{description}\n| } (@{ $form->{all_departments} });
+
+ $department = qq|
+ <tr>
+ <th align=right nowrap>|.$locale->text('Department').qq|</th>
+ <td colspan=3><select name=department>$form->{selectdepartment}</select></td>
+ </tr>
+|;
+ }
+
+
+ # accounting years
+ $form->{selectaccountingyear} = "<option>\n";
+ map { $form->{selectaccountingyear} .= qq|<option>$_\n| } @{ $form->{all_years} };
+ $form->{selectaccountingmonth} = "<option>\n";
+ map { $form->{selectaccountingmonth} .= qq|<option value=$_>|.$locale->text($form->{all_month}{$_}).qq|\n| } sort keys %{ $form->{all_month} };
+
+ $selectfrom = qq|
+ <tr>
+ <th align=right>|.$locale->text('Period').qq|</th>
+ <td colspan=3>
+ <select name=month>$form->{selectaccountingmonth}</select>
+ <select name=year>$form->{selectaccountingyear}</select>
+ <input name=interval class=radio type=radio value=0 checked>|.$locale->text('Current').qq|
+ <input name=interval class=radio type=radio value=1>|.$locale->text('Month').qq|
+ <input name=interval class=radio type=radio value=3>|.$locale->text('Quarter').qq|
+ <input name=interval class=radio type=radio value=12>|.$locale->text('Year').qq|
+ </td>
+ </tr>
+|;
+