- # build branches select
- my $branches = GetBranches;
- my @branchloop_select;
- foreach my $thisbranch ( sort keys %$branches ) {
- my %row = (
- value => $thisbranch,
- branchname => $branches->{$thisbranch}->{'branchname'},
- );
- $row{selected} = 1 if $thisbranch eq $budget->{'budget_branchcode'};
- push @branchloop_select, \%row;
- }
-
- # populates the YUI planning button
- my $categories = GetAuthorisedValueCategories();
- my @auth_cats_loop1 = ();
- foreach my $category (@$categories) {
- my $entry = { category => $category,
- selected => $budget->{sort1_authcat} eq $category ?1:0,
- };
- push @auth_cats_loop1, $entry;
- }
- my @auth_cats_loop2 = ();
- foreach my $category (@$categories) {
- my $entry = { category => $category,
- selected => $budget->{sort2_authcat} eq $category ?1:0,
- };
- push @auth_cats_loop2, $entry;
- }
- $template->param(authorised_value_categories1 => \@auth_cats_loop1);
- $template->param(authorised_value_categories2 => \@auth_cats_loop2);
+ # populates the planning button
+ $template->param(
+ sort1_auth => $budget->{sort1_authcat},
+ sort2_auth => $budget->{sort2_authcat},
+ );