koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha/C4/Circulation Circ2.pm [rel_2_2]


From: Ryan Higgins
Subject: [Koha-cvs] koha/C4/Circulation Circ2.pm [rel_2_2]
Date: Mon, 14 May 2007 19:59:40 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_2_2
Changes by:     Ryan Higgins <rych>     07/05/14 19:59:40

Modified files:
        C4/Circulation : Circ2.pm 

Log message:
        CHANGING ISSUINGRULES BEHAVIOR
        issuingrules had previously cascaded in TooMany sub.
        ie if borrower is under maxissues for borrower/itype/branch,
        then still test for maxissues on borrower/itype/*
        This mod makes behavior fit the 'hints' given in default & npl 
templates.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Circulation/Circ2.pm?cvsroot=koha&only_with_tag=rel_2_2&r1=1.87.2.23&r2=1.87.2.24

Patches:
Index: Circ2.pm
===================================================================
RCS file: /sources/koha/koha/C4/Circulation/Attic/Circ2.pm,v
retrieving revision 1.87.2.23
retrieving revision 1.87.2.24
diff -u -b -r1.87.2.23 -r1.87.2.24
--- Circ2.pm    13 Apr 2007 02:43:36 -0000      1.87.2.23
+++ Circ2.pm    14 May 2007 19:59:39 -0000      1.87.2.24
@@ -3,7 +3,7 @@
 
 package C4::Circulation::Circ2;
 
-# $Id: Circ2.pm,v 1.87.2.23 2007/04/13 02:43:36 rych Exp $
+# $Id: Circ2.pm,v 1.87.2.24 2007/05/14 19:59:39 rych Exp $
 
 #package to deal with Returns
 #written 3/11/99 by address@hidden
@@ -632,7 +632,7 @@
        if (defined($result)) {
                $sth2->execute($borrower->{'borrowernumber'}, "%$type%");
                my $alreadyissued = $sth2->fetchrow;
-               return ("a $alreadyissued / ".($result->{maxissueqty}+0)) if 
($result->{'maxissueqty'} <= $alreadyissued);
+        return (($result->{'maxissueqty'} <= $alreadyissued) ? "a 
$alreadyissued / ".($result->{maxissueqty}+0) : 0 ) ;
        }
        # check for branch=*
        $sth->execute($cat_borrower, $type, "");
@@ -640,7 +640,7 @@
        if (defined($result)) {
                $sth2->execute($borrower->{'borrowernumber'}, "%$type%");
                my $alreadyissued = $sth2->fetchrow;
-               return ("b $alreadyissued / ".($result->{maxissueqty}+0)) if 
($result->{'maxissueqty'} <= $alreadyissued);
+        return (($result->{'maxissueqty'} <= $alreadyissued) ? "b 
$alreadyissued / ".($result->{maxissueqty}+0) : 0 ) ;
        }
        # check for itemtype=*
        $sth->execute($cat_borrower, "*", $branch_borrower);
@@ -648,8 +648,7 @@
        if (defined($result)) {
                $sth3->execute($borrower->{'borrowernumber'});
                my ($alreadyissued) = $sth3->fetchrow;
-               warn "HERE : $alreadyissued / ($result->{maxissueqty} for 
$borrower->{'borrowernumber'}";
-               return ("c $alreadyissued / ".($result->{maxissueqty}+0)) if 
($result->{'maxissueqty'} <= $alreadyissued);
+        return (($result->{'maxissueqty'} <= $alreadyissued) ? "c 
$alreadyissued / ".($result->{maxissueqty}+0) : 0 ) ;
        }
        #check for borrowertype=*
        $sth->execute("*", $type, $branch_borrower);
@@ -657,7 +656,7 @@
        if (defined($result)) {
                $sth2->execute($borrower->{'borrowernumber'}, "%$type%");
                my $alreadyissued = $sth2->fetchrow;
-               return ("d $alreadyissued / ".($result->{maxissueqty}+0)) if 
($result->{'maxissueqty'} <= $alreadyissued);
+        return (($result->{'maxissueqty'} <= $alreadyissued) ? "d 
$alreadyissued / ".($result->{maxissueqty}+0) : 0 ) ;
        }
 
        $sth->execute("*", "*", $branch_borrower);
@@ -665,7 +664,7 @@
        if (defined($result)) {
                $sth3->execute($borrower->{'borrowernumber'});
                my $alreadyissued = $sth3->fetchrow;
-               return ("e $alreadyissued / ".($result->{maxissueqty}+0)) if 
($result->{'maxissueqty'} <= $alreadyissued);
+        return (($result->{'maxissueqty'} <= $alreadyissued) ? "e 
$alreadyissued / ".($result->{maxissueqty}+0) : 0 ) ;
        }
 
        $sth->execute("*", $type, "");
@@ -673,7 +672,7 @@
        if (defined($result) && $result->{maxissueqty} ge 0) {
                $sth2->execute($borrower->{'borrowernumber'}, "%$type%");
                my $alreadyissued = $sth2->fetchrow;
-               return ("f $alreadyissued / ".($result->{maxissueqty}+0)) if 
($result->{'maxissueqty'} <= $alreadyissued);
+        return (($result->{'maxissueqty'} <= $alreadyissued) ? "f 
$alreadyissued / ".($result->{maxissueqty}+0) : 0 ) ;
        }
 
        $sth->execute($cat_borrower, "*", "");
@@ -681,7 +680,7 @@
        if (defined($result)) {
                $sth2->execute($borrower->{'borrowernumber'}, "%$type%");
                my $alreadyissued = $sth2->fetchrow;
-               return ("g $alreadyissued / ".($result->{maxissueqty}+0)) if 
($result->{'maxissueqty'} <= $alreadyissued);
+        return (($result->{'maxissueqty'} <= $alreadyissued) ? "g 
$alreadyissued / ".($result->{maxissueqty}+0) : 0 ) ;
        }
 
        $sth->execute("*", "*", "");
@@ -689,7 +688,7 @@
        if (defined($result)) {
                $sth3->execute($borrower->{'borrowernumber'});
                my $alreadyissued = $sth3->fetchrow;
-               return ("h $alreadyissued / ".($result->{maxissueqty}+0)) if 
($result->{'maxissueqty'} <= $alreadyissued);
+        return (($result->{'maxissueqty'} <= $alreadyissued) ? "h 
$alreadyissued / ".($result->{maxissueqty}+0) : 0 ) ;
        }
        return;
 }




reply via email to

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