koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.98,1.99 Fines.pm,1.11,1.1


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.98,1.99 Fines.pm,1.11,1.12 Returns.pm,1.8,1.9
Date: Wed, 26 Oct 2005 02:12:36 -0700

Update of /cvsroot/koha/koha/C4/Circulation
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28839/C4/Circulation

Modified Files:
        Circ2.pm Fines.pm Returns.pm 
Log Message:
big commit, still breaking things...

* synch with rel_2_2. Probably the last non manual synch, as rel_2_2 should not 
be modified deeply.
* code cleaning (cleaning warnings from perl -w) continued

Index: Circ2.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Circulation/Circ2.pm,v
retrieving revision 1.98
retrieving revision 1.99
diff -C2 -r1.98 -r1.99
*** Circ2.pm    22 Sep 2005 23:30:37 -0000      1.98
--- Circ2.pm    26 Oct 2005 09:12:33 -0000      1.99
***************
*** 35,39 ****
  use C4::Reserves2;
  use C4::Koha;
! use C4::Accounts;
  use Date::Manip;
  
--- 35,39 ----
  use C4::Reserves2;
  use C4::Koha;
! use C4::Accounts2;
  use Date::Manip;
  
***************
*** 619,623 ****
        my $type = $sth->fetchrow;
        $sth = $dbh->prepare('select * from issuingrules where categorycode = ? 
and itemtype = ? and branchcode = ?');
!       my $sth2 = $dbh->prepare("select COUNT(*) from issues i, biblioitems s 
where i.borrowernumber = ? and i.returndate is null and i.itemnumber = 
s.biblioitemnumber and s.itemtype like ?");
        my $sth3 = $dbh->prepare('select COUNT(*) from issues where 
borrowernumber = ? and returndate is null');
        my $alreadyissued;
--- 619,624 ----
        my $type = $sth->fetchrow;
        $sth = $dbh->prepare('select * from issuingrules where categorycode = ? 
and itemtype = ? and branchcode = ?');
! #     my $sth2 = $dbh->prepare("select COUNT(*) from issues i, biblioitems s 
where i.borrowernumber = ? and i.returndate is null and i.itemnumber = 
s.biblioitemnumber and s.itemtype like ?");
!       my $sth2 = $dbh->prepare("select COUNT(*) from issues i, biblioitems 
s1, items s2 where i.borrowernumber = ? and i.returndate is null and 
i.itemnumber = s2.itemnumber and s1.itemtype like ? and s1.biblioitemnumber = 
s2.biblioitemnumber");
        my $sth3 = $dbh->prepare('select COUNT(*) from issues where 
borrowernumber = ? and returndate is null');
        my $alreadyissued;
***************
*** 633,637 ****
        # check for branch=*
        $sth->execute($cat_borrower, $type, "");
!       my $result = $sth->fetchrow_hashref;
        if (defined($result)) {
                $sth2->execute($borrower->{'borrowernumber'}, "%$type%");
--- 634,638 ----
        # check for branch=*
        $sth->execute($cat_borrower, $type, "");
!       $result = $sth->fetchrow_hashref;
        if (defined($result)) {
                $sth2->execute($borrower->{'borrowernumber'}, "%$type%");
***************
*** 641,645 ****
        # check for itemtype=*
        $sth->execute($cat_borrower, "*", $branch_borrower);
!       my $result = $sth->fetchrow_hashref;
        if (defined($result)) {
                $sth3->execute($borrower->{'borrowernumber'});
--- 642,646 ----
        # check for itemtype=*
        $sth->execute($cat_borrower, "*", $branch_borrower);
!       $result = $sth->fetchrow_hashref;
        if (defined($result)) {
                $sth3->execute($borrower->{'borrowernumber'});
***************
*** 650,654 ****
        #check for borrowertype=*
        $sth->execute("*", $type, $branch_borrower);
!       my $result = $sth->fetchrow_hashref;
        if (defined($result)) {
                $sth2->execute($borrower->{'borrowernumber'}, "%$type%");
--- 651,655 ----
        #check for borrowertype=*
        $sth->execute("*", $type, $branch_borrower);
!       $result = $sth->fetchrow_hashref;
        if (defined($result)) {
                $sth2->execute($borrower->{'borrowernumber'}, "%$type%");
***************
*** 658,662 ****
  
        $sth->execute("*", "*", $branch_borrower);
!       my $result = $sth->fetchrow_hashref;
        if (defined($result)) {
                $sth3->execute($borrower->{'borrowernumber'});
--- 659,663 ----
  
        $sth->execute("*", "*", $branch_borrower);
!       $result = $sth->fetchrow_hashref;
        if (defined($result)) {
                $sth3->execute($borrower->{'borrowernumber'});
***************
*** 666,670 ****
  
        $sth->execute("*", $type, "");
!       my $result = $sth->fetchrow_hashref;
        if (defined($result) && $result->{maxissueqty}>=0) {
                $sth2->execute($borrower->{'borrowernumber'}, "%$type%");
--- 667,671 ----
  
        $sth->execute("*", $type, "");
!       $result = $sth->fetchrow_hashref;
        if (defined($result) && $result->{maxissueqty}>=0) {
                $sth2->execute($borrower->{'borrowernumber'}, "%$type%");
***************
*** 674,678 ****
  
        $sth->execute($cat_borrower, "*", "");
!       my $result = $sth->fetchrow_hashref;
        if (defined($result)) {
                $sth2->execute($borrower->{'borrowernumber'}, "%$type%");
--- 675,679 ----
  
        $sth->execute($cat_borrower, "*", "");
!       $result = $sth->fetchrow_hashref;
        if (defined($result)) {
                $sth2->execute($borrower->{'borrowernumber'}, "%$type%");
***************
*** 682,686 ****
  
        $sth->execute("*", "*", "");
!       my $result = $sth->fetchrow_hashref;
        if (defined($result)) {
                $sth3->execute($borrower->{'borrowernumber'});
--- 683,687 ----
  
        $sth->execute("*", "*", "");
!       $result = $sth->fetchrow_hashref;
        if (defined($result)) {
                $sth3->execute($borrower->{'borrowernumber'});
***************
*** 938,966 ****
        
        $sth->execute($borrowertype,$itemtype,"");
!       my $loanlength = $sth->fetchrow_hashref;
        return $loanlength->{issuelength} if defined($loanlength) && 
$loanlength->{issuelength} ne 'NULL';
        
        $sth->execute($borrowertype,"*",$branchcode);
!       my $loanlength = $sth->fetchrow_hashref;
        return $loanlength->{issuelength} if defined($loanlength) && 
$loanlength->{issuelength} ne 'NULL';
  
        $sth->execute("*",$itemtype,$branchcode);
!       my $loanlength = $sth->fetchrow_hashref;
        return $loanlength->{issuelength} if defined($loanlength) && 
$loanlength->{issuelength} ne 'NULL';
  
        $sth->execute($borrowertype,"*","");
!       my $loanlength = $sth->fetchrow_hashref;
        return $loanlength->{issuelength} if defined($loanlength) && 
$loanlength->{issuelength} ne 'NULL';
  
        $sth->execute("*","*",$branchcode);
!       my $loanlength = $sth->fetchrow_hashref;
        return $loanlength->{issuelength} if defined($loanlength) && 
$loanlength->{issuelength} ne 'NULL';
  
        $sth->execute("*",$itemtype,"");
!       my $loanlength = $sth->fetchrow_hashref;
        return $loanlength->{issuelength} if defined($loanlength) && 
$loanlength->{issuelength} ne 'NULL';
  
        $sth->execute("*","*","");
!       my $loanlength = $sth->fetchrow_hashref;
        return $loanlength->{issuelength} if defined($loanlength) && 
$loanlength->{issuelength} ne 'NULL';
  
--- 939,967 ----
        
        $sth->execute($borrowertype,$itemtype,"");
!       $loanlength = $sth->fetchrow_hashref;
        return $loanlength->{issuelength} if defined($loanlength) && 
$loanlength->{issuelength} ne 'NULL';
        
        $sth->execute($borrowertype,"*",$branchcode);
!       $loanlength = $sth->fetchrow_hashref;
        return $loanlength->{issuelength} if defined($loanlength) && 
$loanlength->{issuelength} ne 'NULL';
  
        $sth->execute("*",$itemtype,$branchcode);
!       $loanlength = $sth->fetchrow_hashref;
        return $loanlength->{issuelength} if defined($loanlength) && 
$loanlength->{issuelength} ne 'NULL';
  
        $sth->execute($borrowertype,"*","");
!       $loanlength = $sth->fetchrow_hashref;
        return $loanlength->{issuelength} if defined($loanlength) && 
$loanlength->{issuelength} ne 'NULL';
  
        $sth->execute("*","*",$branchcode);
!       $loanlength = $sth->fetchrow_hashref;
        return $loanlength->{issuelength} if defined($loanlength) && 
$loanlength->{issuelength} ne 'NULL';
  
        $sth->execute("*",$itemtype,"");
!       $loanlength = $sth->fetchrow_hashref;
        return $loanlength->{issuelength} if defined($loanlength) && 
$loanlength->{issuelength} ne 'NULL';
  
        $sth->execute("*","*","");
!       $loanlength = $sth->fetchrow_hashref;
        return $loanlength->{issuelength} if defined($loanlength) && 
$loanlength->{issuelength} ne 'NULL';
  
***************
*** 1650,1654 ****
                        $renewokay = 0;
                }
!               my ($resfound, $resrec) = CheckReserves($itemno);
                  if ($resfound) {
                          $renewokay = 0;
--- 1651,1655 ----
                        $renewokay = 0;
                }
!               ($resfound, $resrec) = CheckReserves($itemno);
                  if ($resfound) {
                          $renewokay = 0;
***************
*** 1793,1809 ****
  
  
- sub getnextacctno {
- # Stolen from Accounts.pm
-     my ($env,$bornumber,$dbh)address@hidden;
-     my $nextaccntno = 1;
-     my $sth = $dbh->prepare("select * from accountlines where (borrowernumber 
= ?) order by accountno desc");
-     $sth->execute($bornumber);
-     if (my $accdata=$sth->fetchrow_hashref){
-       $nextaccntno = $accdata->{'accountno'} + 1;
-     }
-     $sth->finish;
-     return($nextaccntno);
- }
- 
  =item find_reserves
  
--- 1794,1797 ----

Index: Fines.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Circulation/Fines.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** Fines.pm    20 Jun 2005 14:10:31 -0000      1.11
--- Fines.pm    26 Oct 2005 09:12:33 -0000      1.12
***************
*** 148,152 ****
    # categoryitem table.
  
!   my $sth=$dbh->prepare("Select * from 
items,biblioitems,itemtypes,categoryitem where items.itemnumber=?
    and items.biblioitemnumber=biblioitems.biblioitemnumber and
    biblioitems.itemtype=itemtypes.itemtype and
--- 148,152 ----
    # categoryitem table.
  
!   my $sth=$dbh->prepare("Select * from 
items,biblioitems,itemtypes,issuingrules where items.itemnumber=?
    and items.biblioitemnumber=biblioitems.biblioitemnumber and
    biblioitems.itemtype=itemtypes.itemtype and

Index: Returns.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Circulation/Returns.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** Returns.pm  22 Sep 2005 15:31:05 -0000      1.8
--- Returns.pm  26 Oct 2005 09:12:33 -0000      1.9
***************
*** 32,36 ****
  use DBI;
  use C4::Context;
! use C4::Accounts;
  use C4::InterfaceCDK;
  use C4::Circulation::Main;
--- 32,36 ----
  use DBI;
  use C4::Context;
! use C4::Accounts2;
  use C4::InterfaceCDK;
  use C4::Circulation::Main;




reply via email to

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