| Lines 901-926
          sub CanBookBeIssued {
      
      
        Link Here | 
        
          | 901 |         $alerts{OTHER_CHARGES} = sprintf( "%.2f", $other_charges ); | 901 |         $alerts{OTHER_CHARGES} = sprintf( "%.2f", $other_charges ); | 
        
          | 902 |     } | 902 |     } | 
        
          | 903 |  | 903 |  | 
          
            
              | 904 |     my ($blocktype, $count) = C4::Members::IsMemberBlocked($borrower->{'borrowernumber'}); | 904 |     my $patron = Koha::Patrons->find( $borrower->{borrowernumber} ); | 
            
              | 905 |     if ($blocktype == -1) { | 905 |     if ( my $debarred_date = $patron->is_debarred ) { | 
            
              | 906 |         ## patron has outstanding overdue loans | 906 |          # patron has accrued fine days or has a restriction. $count is a date | 
            
              | 907 | 	    if ( C4::Context->preference("OverduesBlockCirc") eq 'block'){ | 907 |         if ($debarred_date eq '9999-12-31') { | 
            
              | 908 | 	        $issuingimpossible{USERBLOCKEDOVERDUE} = $count; | 908 |             $issuingimpossible{USERBLOCKEDNOENDDATE} = $debarred_date; | 
            
              | 909 | 	    } |  |  | 
            
              | 910 | 	    elsif ( C4::Context->preference("OverduesBlockCirc") eq 'confirmation'){ | 
            
              | 911 | 	        $needsconfirmation{USERBLOCKEDOVERDUE} = $count; | 
            
              | 912 | 	    } | 
            
              | 913 |     } elsif($blocktype == 1) { | 
            
              | 914 |         # patron has accrued fine days or has a restriction. $count is a date | 
            
              | 915 |         if ($count eq '9999-12-31') { | 
            
              | 916 |             $issuingimpossible{USERBLOCKEDNOENDDATE} = $count; | 
        
          | 917 |         } | 909 |         } | 
        
          | 918 |         else { | 910 |         else { | 
          
            
              | 919 |             $issuingimpossible{USERBLOCKEDWITHENDDATE} = $count; | 911 |             $issuingimpossible{USERBLOCKEDWITHENDDATE} = $debarred_date; | 
            
              |  |  | 912 |         } | 
            
              | 913 |     } elsif ( my $num_overdues = $patron->has_overdues ) { | 
            
              | 914 |         ## patron has outstanding overdue loans | 
            
              | 915 |         if ( C4::Context->preference("OverduesBlockCirc") eq 'block'){ | 
            
              | 916 |             $issuingimpossible{USERBLOCKEDOVERDUE} = $num_overdues; | 
            
              | 917 |         } | 
            
              | 918 |         elsif ( C4::Context->preference("OverduesBlockCirc") eq 'confirmation'){ | 
            
              | 919 |             $needsconfirmation{USERBLOCKEDOVERDUE} = $num_overdues; | 
        
          | 920 |         } | 920 |         } | 
        
          | 921 |     } | 921 |     } | 
        
          | 922 |  | 922 |  | 
            
              | 923 | # |  |  | 
        
          | 924 |     # JB34 CHECKS IF BORROWERS DON'T HAVE ISSUE TOO MANY BOOKS | 923 |     # JB34 CHECKS IF BORROWERS DON'T HAVE ISSUE TOO MANY BOOKS | 
        
          | 925 |     # | 924 |     # | 
        
          | 926 |     my $toomany = TooMany( $borrower, $item->{biblionumber}, $item, { onsite_checkout => $onsite_checkout } ); | 925 |     my $toomany = TooMany( $borrower, $item->{biblionumber}, $item, { onsite_checkout => $onsite_checkout } ); |