Bug 23051: (follow-up) Remove call to GetFines
authorAndrew Isherwood <andrew.isherwood@ptfs-europe.com>
Thu, 5 Mar 2020 10:26:38 +0000 (10:26 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 6 Mar 2020 10:03:55 +0000 (10:03 +0000)
As mentioned by Nick in comment #69 and subsequently discussed on Slack,
the call to GetFines in renew_item was unnececcesary. It has now been
removed.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Koha/Account/Line.pm

index 8a6f030..8f10ac3 100644 (file)
@@ -827,15 +827,6 @@ sub renew_item {
 
     my $itemnumber = $self->item->itemnumber;
     my $borrowernumber = $self->patron->borrowernumber;
-    # Only do something if this item has no fines left on it
-    my $fine = C4::Overdues::GetFine($itemnumber, $borrowernumber);
-    if ($fine && $fine > 0) {
-        return {
-            itemnumber => $itemnumber,
-            error      => 'has_fine',
-            success    => 0
-        };
-    }
     my ( $can_renew, $error ) = C4::Circulation::CanBookBeRenewed(
         $borrowernumber,
         $itemnumber