[Koha-bugs] [Bug 8236] Prevent renewing if overdue or restriction

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Aug 29 10:51:24 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8236

--- Comment #53 from Fridolyn SOMERS <fridolyn.somers at biblibre.com> ---
This patch removes the variable $issue from C4/ILSDI/Services.pm :

--- a/C4/ILSDI/Services.pm
+++ b/C4/ILSDI/Services.pm
@@ -561,11 +561,10 @@ sub RenewLoan {
     return { code => 'RecordNotFound' } unless $$item{itemnumber};

     # Add renewal if possible
-    my @renewal = CanBookBeRenewed( $borrowernumber, $itemnumber );
+    my ($blockallitems,$reasonwhy,$overduesblockrenew) =
HasAnyRenewalToBeBlocked($borrowernumber,undef);
+    my @renewal = $blockallitems ? (0, $reasonwhy) : CanBookBeRenewed(
$borrowernumber, $itemnumber, undef, $overduesblockrenew );
     if ( $renewal[0] ) { AddRenewal( $borrowernumber, $itemnumber ); }

-    my $issue = GetItemIssue($itemnumber);
-
     # Hashref building
     my $out;
     $out->{'renewals'} = $issue->{'renewals'};

Is this normal?
This variable is still used in the script.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list