Lines 364-370
sub GetSuggestionByStatus {
Link Here
|
364 |
|
364 |
|
365 |
&CountSuggestion($status) |
365 |
&CountSuggestion($status) |
366 |
|
366 |
|
367 |
Count the number of aqorders with the status given on input argument. |
367 |
Count the number of aqorders of current branch and with the status given on input argument. |
368 |
the arg status can be : |
368 |
the arg status can be : |
369 |
|
369 |
|
370 |
=over 2 |
370 |
=over 2 |
Lines 408-415
sub CountSuggestion {
Link Here
|
408 |
FROM suggestions |
408 |
FROM suggestions |
409 |
WHERE STATUS=? |
409 |
WHERE STATUS=? |
410 |
}; |
410 |
}; |
|
|
411 |
my @params = ($status); |
412 |
unless ($userenv->{branch} eq 'NO_LIBRARY_SET') { |
413 |
$query .= q{ AND branchcode=? }; |
414 |
push @params, $userenv->{branch}; |
415 |
} |
411 |
$sth = $dbh->prepare($query); |
416 |
$sth = $dbh->prepare($query); |
412 |
$sth->execute($status); |
417 |
$sth->execute(@params); |
413 |
} |
418 |
} |
414 |
my ($result) = $sth->fetchrow; |
419 |
my ($result) = $sth->fetchrow; |
415 |
return $result; |
420 |
return $result; |
416 |
- |
|
|