koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-devel] CVS: koha/C4/Circulation Circ2.pm,1.19,1.20


From: Chris Cormack
Subject: [Koha-devel] CVS: koha/C4/Circulation Circ2.pm,1.19,1.20
Date: Sun Nov 25 12:18:03 2001

Update of /cvsroot/koha/koha/C4/Circulation
In directory usw-pr-cvs1:/tmp/cvs-serv23201/C4/Circulation

Modified Files:
        Circ2.pm 
Log Message:
Fixing reserve handling.
Mulitple copy reserves now handled correctly, and correct charges are being
applied


Index: Circ2.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Circulation/Circ2.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** Circ2.pm    2001/10/10 19:28:05     1.19
--- Circ2.pm    2001/11/25 20:17:53     1.20
***************
*** 24,28 ****
      
  @ISA = qw(Exporter);
! @EXPORT = qw(&getbranches &getprinters &getpatroninformation &currentissues 
&getiteminformation &findborrower &issuebook &returnbook);
  %EXPORT_TAGS = ( );     # eg: TAG => [ qw!name1 name2! ],
                  
--- 24,29 ----
      
  @ISA = qw(Exporter);
! @EXPORT = qw(&getbranches &getprinters &getpatroninformation &currentissues 
&getiteminformation &findborrower &issuebook &returnbook
! &find_reserves);
  %EXPORT_TAGS = ( );     # eg: TAG => [ qw!name1 name2! ],
                  
***************
*** 477,481 ****
                $usth->execute;
                $usth->finish;
!               $uquery="update items set itemnotes='' where 
itemnumber=$iteminformation->{'itemnumber'}";
                $usth = $dbh->prepare($uquery);
                $usth->execute;
--- 478,482 ----
                $usth->execute;
                $usth->finish;
!               $uquery="update items set paidfor='' where 
itemnumber=$iteminformation->{'itemnumber'}";
                $usth = $dbh->prepare($uquery);
                $usth->execute;
***************
*** 888,891 ****
--- 889,893 ----
    my $resrec;
    my $lastrec;
+ #  print $query;
    while (($resrec=$sth->fetchrow_hashref) && ($resfound eq "n")) {
        $lastrec=$resrec;
***************
*** 893,915 ****
        if ($resrec->{'itemnumber'} eq $itemno) {
          $resfound = "y";
!       }
!     } 
!     if ($resrec->{'constrainttype'} eq "a") {
!       $resfound = "y";
      } else {
!       my $conquery = "select * from reserveconstraints where borrowernumber
! = $resrec->{'borrowernumber'} and reservedate = '$resrec->{'reservedate'}' 
and biblionumber = $resrec->{'biblionumber'} and biblioitemnumber = 
$itemdata->{'biblioitemnumber'}";
!       my $consth = $dbh->prepare($conquery);
!       $consth->execute;
!       if (my $conrec=$consth->fetchrow_hashref) {
!         if ($resrec->{'constrainttype'} eq "o") {
!          $resfound = "y";
!        }
        } else {
!         if ($resrec->{'constrainttype'} eq "e") {
!         $resfound = "y";
!       }
        }
-       $consth->finish;
      }
      if ($resfound eq "y") {
--- 895,918 ----
        if ($resrec->{'itemnumber'} eq $itemno) {
          $resfound = "y";
!       } 
      } else {
!       if ($resrec->{'constrainttype'} eq "a") {
!         $resfound = "y";
        } else {
!         my $conquery = "select * from reserveconstraints where borrowernumber
! = $resrec->{'borrowernumber'} and reservedate = '$resrec->{'reservedate'}' 
and biblionumber = $resrec->{'biblionumber'} and biblioitemnumber = 
$itemdata->{'biblioitemnumber'}";
!         my $consth = $dbh->prepare($conquery);
!         $consth->execute;
!         if (my $conrec=$consth->fetchrow_hashref) {
!           if ($resrec->{'constrainttype'} eq "o") {
!            $resfound = "y";
!          }
!         } else {
!           if ($resrec->{'constrainttype'} eq "e") {
!           $resfound = "y";
!         }
!         }
!         $consth->finish;
        }
      }
      if ($resfound eq "y") {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]