|
Lines 56-62
my ( $template, $borrowernumber, $cookie, $staff_flags ) = get_template_and_user
Link Here
|
| 56 |
); |
56 |
); |
| 57 |
|
57 |
|
| 58 |
my $budget_period_id = $input->param('budget_period_id'); |
58 |
my $budget_period_id = $input->param('budget_period_id'); |
| 59 |
|
59 |
warn "budget_period_id : " . Data::Dumper::Dumper($budget_period_id); |
| 60 |
# ' ------- get periods stuff ------------------' |
60 |
# ' ------- get periods stuff ------------------' |
| 61 |
# IF PERIOD_ID IS DEFINED, GET THE PERIOD - ELSE GET THE ACTIVE PERIOD BY DEFAULT |
61 |
# IF PERIOD_ID IS DEFINED, GET THE PERIOD - ELSE GET THE ACTIVE PERIOD BY DEFAULT |
| 62 |
my $period = GetBudgetPeriod($budget_period_id); |
62 |
my $period = GetBudgetPeriod($budget_period_id); |
|
Lines 156-161
while ( my ($category) = $sth->fetchrow_array ) {
Link Here
|
| 156 |
push( @category_list, 'MONTHS' ); |
156 |
push( @category_list, 'MONTHS' ); |
| 157 |
push( @category_list, 'ITEMTYPES' ); |
157 |
push( @category_list, 'ITEMTYPES' ); |
| 158 |
push( @category_list, 'BRANCHES' ); |
158 |
push( @category_list, 'BRANCHES' ); |
|
|
159 |
push( @category_list, $$_{'authcat'} ) foreach @$auth_cats_loop; |
| 159 |
|
160 |
|
| 160 |
#reorder the list |
161 |
#reorder the list |
| 161 |
@category_list = sort { $a cmp $b } @category_list; |
162 |
@category_list = sort { $a cmp $b } @category_list; |
|
Lines 177-183
my @authvals;
Link Here
|
| 177 |
my %labels; |
178 |
my %labels; |
| 178 |
|
179 |
|
| 179 |
my @names = $input->param(); |
180 |
my @names = $input->param(); |
| 180 |
|
|
|
| 181 |
# ------------------------------------------------------------ |
181 |
# ------------------------------------------------------------ |
| 182 |
if ( $op eq 'save' ) { |
182 |
if ( $op eq 'save' ) { |
| 183 |
|
183 |
|
|
Lines 294-299
elsif ( $authcat eq 'ITEMTYPES' ) {
Link Here
|
| 294 |
} |
294 |
} |
| 295 |
} |
295 |
} |
| 296 |
$sth->finish; |
296 |
$sth->finish; |
|
|
297 |
} elsif ($authcat) { |
| 298 |
my $query = qq{ SELECT * FROM authorised_values WHERE category=? order by lib }; |
| 299 |
my $sth = $dbh->prepare($query); |
| 300 |
$sth->execute($authcat); |
| 301 |
if ( $sth->rows > 0 ) { |
| 302 |
for ( my $i = 0 ; $i < $sth->rows ; $i++ ) { |
| 303 |
my $results = $sth->fetchrow_hashref; |
| 304 |
push @authvals, $results->{authorised_value}; |
| 305 |
$labels{ $results->{authorised_value} } = $results->{lib}; |
| 306 |
} |
| 307 |
} |
| 308 |
$sth->finish; |
| 297 |
} |
309 |
} |
| 298 |
|
310 |
|
| 299 |
my @authvals_row; |
311 |
my @authvals_row; |