Update of /cvsroot/koha/koha/C4/Circulation In directory usw-pr-cvs1:/tmp/cvs-serv10801/C4/Circulation Modified Files: Circ2.pm Log Message: Made some changes to checkreserve and find_reserves, so that items are always displayed as reserved when returned, not just once Index: Circ2.pm =================================================================== RCS file: /cvsroot/koha/koha/C4/Circulation/Circ2.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** Circ2.pm 2001/02/05 17:47:58 1.11 --- Circ2.pm 2001/02/14 00:27:36 1.12 *************** *** 418,422 **** my ($branches) = getbranches(); my $branchname=$branches->{$resrec->{'branchcode'}}->{'branchname'}; ! push (@$messages, "Reserved for collection by $borrower->{'firstname'} $borrower->{'surname'} ($borrower->{'cardnumber'}) at $branchname"); } UpdateStats($env,'branch','return','0','',$iteminformation->{'itemnumber'}); --- 418,422 ---- my ($branches) = getbranches(); my $branchname=$branches->{$resrec->{'branchcode'}}->{'branchname'}; ! push (@$messages, "<b><font color=red>RESERVED</font></b> for collection by $borrower->{'firstname'} $borrower->{'surname'} ($borrower->{'cardnumber'}) at $branchname"); } UpdateStats($env,'branch','return','0','',$iteminformation->{'itemnumber'}); *************** *** 540,544 **** $sth->execute(); my $resrec; ! if (my $data=$sth->fetchrow_hashref) { $resrec=$data; my $const = $data->{'constrainttype'}; --- 540,545 ---- $sth->execute(); my $resrec; ! my $data=$sth->fetchrow_hashref; ! while ($data && $resbor eq '') { $resrec=$data; my $const = $data->{'constrainttype'}; *************** *** 563,566 **** --- 564,568 ---- $csth->finish(); } + $data=$sth->fetchrow_hashref; } $sth->finish; *************** *** 777,781 **** my ($env,$dbh,$itemno) = @_; my ($itemdata) = getiteminformation($env,$itemno,0); ! my $query = "select * from reserves where found is null and biblionumber = $itemdata->{'biblionumber'} and cancellationdate is NULL order by priority,reservedate "; --- 779,785 ---- my ($env,$dbh,$itemno) = @_; my ($itemdata) = getiteminformation($env,$itemno,0); ! my $query = "select * from reserves where ! ((reserves.found = 'W') ! or (reserves.found is null)) and biblionumber = $itemdata->{'biblionumber'} and cancellationdate is NULL order by priority,reservedate "; *************** *** 791,795 **** $resfound = "y"; } ! } elsif ($resrec->{'constrainttype'} eq "a") { $resfound = "y"; } else { --- 795,800 ---- $resfound = "y"; } ! } ! if ($resrec->{'constrainttype'} eq "a") { $resfound = "y"; } else {