Working on a fix for bug 1456

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Chris Cormack 2007-10-21 21:05:53 -05:00 committed by Joshua Ferraro
parent 904caa1e61
commit c3c520b385
3 changed files with 20 additions and 10 deletions

View File

@ -94,8 +94,7 @@ C4::Reserves - Koha functions for dealing with reservation.
&GetReservesToBranch
&GetReserveCount
&GetReserveFee
&GetReservesForBranch
&GetReservesToBranch
&GetOtherReserves
&ModReserveFill

View File

@ -100,16 +100,20 @@ my $strsth =
LEFT JOIN borrowers ON reserves.borrowernumber=borrowers.borrowernumber
LEFT JOIN biblio ON reserves.biblionumber=biblio.biblionumber
WHERE isnull(cancellationdate)
&& reserves.found is NULL
&& items.holdingbranch=?
";
AND reserves.found is NULL ";
if (C4::Context->preference('IndependantBranches')){
$strsth .= " items.holdingbranch=? ";
}
$strsth .= $sqlorderby;
my $sth = $dbh->prepare($strsth);
$sth->execute(C4::Context->userenv->{'branch'});
if (C4::Context->preference('IndependantBranches')){
$sth->execute(C4::Context->userenv->{'branch'});
}
else {
$sth->execute();
}
my @reservedata;
my $previous;
my $this;

View File

@ -108,8 +108,15 @@ if ($item) {
my @reservloop;
my @getreserves = GetReservesForBranch($default);
my @getreserves;
if (C4::Context->preference('IndependantBranches')){
@getreserves = GetReservesForBranch($default);
}
else {
@getreserves = GetReservesForBranch($default);
# need to have a routine to get all waiting reserves
}
foreach my $num (@getreserves) {
my %getreserv;
my $gettitle = GetBiblioFromItemNumber( $num->{'itemnumber'} );