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


From: Robert Lyon
Subject: [Koha-cvs] koha/C4/Circulation Circ2.pm
Date: Wed, 07 Jun 2006 01:56:57 +0000

CVSROOT:        /sources/koha
Module name:    koha
Changes by:     Robert Lyon <bob_lyon>  06/06/07 01:56:57

Modified files:
        C4/Circulation : Circ2.pm 

Log message:
        Merging Katipo changes...
        
        Adding the allowance for making issuing impossible after a patron has
        accumulated a certain level of debt

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Circulation/Circ2.pm?cvsroot=koha&r1=1.106&r2=1.107

Patches:
Index: Circ2.pm
===================================================================
RCS file: /sources/koha/koha/C4/Circulation/Circ2.pm,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -b -r1.106 -r1.107
--- Circ2.pm    7 Jun 2006 01:38:14 -0000       1.106
+++ Circ2.pm    7 Jun 2006 01:56:57 -0000       1.107
@@ -3,7 +3,7 @@
 
 package C4::Circulation::Circ2;
 
-# $Id: Circ2.pm,v 1.106 2006/06/07 01:38:14 bob_lyon Exp $
+# $Id: Circ2.pm,v 1.107 2006/06/07 01:56:57 bob_lyon Exp $
 
 #package to deal with Returns
 #written 3/11/99 by address@hidden
@@ -765,7 +765,7 @@
 
 
 sub canbookbeissued {
-       my ($env,$borrower,$barcode,$year,$month,$day) = @_;
+       my ($env,$borrower,$barcode,$year,$month,$day,$inprocess) = @_;
        my %needsconfirmation; # filled with problems that needs confirmations
        my %issuingimpossible; # filled with problems that causes the issue to 
be IMPOSSIBLE
        my $iteminformation = getiteminformation($env, 0, $barcode);
@@ -797,10 +797,18 @@
 
 # DEBTS
        my $amount = checkaccount($env,$borrower->{'borrowernumber'}, 
$dbh,$duedate);
+        if($C4::Context->preference("IssuingInProcess")){
+           my $amountlimit = $C4::Context->preference("maxoutstanding");
+           if ($amount > $amountlimit && !$inprocess) {
+               $issuingimpossible{DEBT} = sprintf("%.2f",$amount);
+           } elsif ($amount <= $amountlimit && !$inprocess) {
+               $needsconfirmation{DEBT} = sprintf("%.2f",$amount);
+           }
+        } else {
        if ($amount >0) {
                $needsconfirmation{DEBT} = $amount;
        }
-
+       }
 
 #
 # JB34 CHECKS IF BORROWERS DONT HAVE ISSUE TOO MANY BOOKS




reply via email to

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