| 
      
            Lines 62-67
          use Koha::Checkouts::ReturnClaims;
      
      
        Link Here
      
     | 
  
        
          | 62 | 
          use Carp;  | 
          62 | 
          use Carp;  | 
        
        
          | 63 | 
          use List::MoreUtils qw( uniq any );  | 
          63 | 
          use List::MoreUtils qw( uniq any );  | 
        
        
          | 64 | 
          use Scalar::Util qw( looks_like_number );  | 
          64 | 
          use Scalar::Util qw( looks_like_number );  | 
        
            
               | 
               | 
              65 | 
              use Try::Tiny;  | 
            
        
          | 65 | 
          use Date::Calc qw(  | 
          66 | 
          use Date::Calc qw(  | 
        
        
          | 66 | 
            Today  | 
          67 | 
            Today  | 
        
        
          | 67 | 
            Today_and_Now  | 
          68 | 
            Today_and_Now  | 
        
  
    | 
      
            Lines 3059-3064
          sub AddRenewal {
      
      
        Link Here
      
     | 
  
        
          | 3059 | 
                      DelUniqueDebarment({ borrowernumber => $borrowernumber, type => 'OVERDUES' }); | 
          3060 | 
                      DelUniqueDebarment({ borrowernumber => $borrowernumber, type => 'OVERDUES' }); | 
        
        
          | 3060 | 
                  }  | 
          3061 | 
                  }  | 
        
        
          | 3061 | 
           | 
          3062 | 
           | 
        
            
               | 
               | 
              3063 | 
                      _post_renewal_actions(  | 
            
            
              | 3064 | 
                          { | 
            
            
              | 3065 | 
                              renewal_library_id =>  | 
            
            
              | 3066 | 
                                $item_object->renewal_branchcode( { branch => $branch } ), | 
            
            
              | 3067 | 
                              charge            => $charge,  | 
            
            
              | 3068 | 
                              item_id           => $itemnumber,  | 
            
            
              | 3069 | 
                              item_type         => $itemtype,  | 
            
            
              | 3070 | 
                              shelving_location => $item_object->location // q{}, | 
            
            
              | 3071 | 
                              patron_id         => $borrowernumber,  | 
            
            
              | 3072 | 
                              collection_code   => $item_object->ccode // q{}, | 
            
            
              | 3073 | 
                              date_due          => $datedue  | 
            
            
              | 3074 | 
                          }  | 
            
            
              | 3075 | 
                      ) if C4::Context->config("enable_plugins"); | 
            
            
              | 3076 | 
               | 
            
        
          | 3062 | 
                  # Add the renewal to stats  | 
          3077 | 
                  # Add the renewal to stats  | 
        
        
          | 3063 | 
                  UpdateStats(  | 
          3078 | 
                  UpdateStats(  | 
        
        
          | 3064 | 
                      { | 
          3079 | 
                      { | 
        
  
    | 
      
            Lines 4197-4202
          sub GetTopIssues {
      
      
        Link Here
      
     | 
  
        
          | 4197 | 
              return @$rows;  | 
          4212 | 
              return @$rows;  | 
        
        
          | 4198 | 
          }  | 
          4213 | 
          }  | 
        
        
          | 4199 | 
           | 
          4214 | 
           | 
        
            
               | 
               | 
              4215 | 
              =head2 Internal methods  | 
            
            
              | 4216 | 
               | 
            
            
              | 4217 | 
              =cut  | 
            
            
              | 4218 | 
               | 
            
        
          | 4200 | 
          sub _CalculateAndUpdateFine { | 
          4219 | 
          sub _CalculateAndUpdateFine { | 
        
        
          | 4201 | 
              my ($params) = @_;  | 
          4220 | 
              my ($params) = @_;  | 
        
        
          | 4202 | 
           | 
          4221 | 
           | 
        
  
    | 
      
            Lines 4273-4278
          sub _item_denied_renewal {
      
      
        Link Here
      
     | 
  
        
          | 4273 | 
              return 0;  | 
          4292 | 
              return 0;  | 
        
        
          | 4274 | 
          }  | 
          4293 | 
          }  | 
        
        
          | 4275 | 
           | 
          4294 | 
           | 
        
            
               | 
               | 
              4295 | 
              =head3 _post_renewal_actions  | 
            
            
              | 4296 | 
               | 
            
            
              | 4297 | 
              Internal method that calls the post_renewal_action plugin hook on configured  | 
            
            
              | 4298 | 
              plugins.  | 
            
            
              | 4299 | 
               | 
            
            
              | 4300 | 
              =cut  | 
            
            
              | 4301 | 
               | 
            
            
              | 4302 | 
              sub _post_renewal_actions { | 
            
            
              | 4303 | 
                  my ($params) = @_;  | 
            
            
              | 4304 | 
               | 
            
            
              | 4305 | 
                  my @plugins = Koha::Plugins->new->GetPlugins({ | 
            
            
              | 4306 | 
                      method => 'post_renewal_action',  | 
            
            
              | 4307 | 
                  });  | 
            
            
              | 4308 | 
               | 
            
            
              | 4309 | 
                  foreach my $plugin ( @plugins ) { | 
            
            
              | 4310 | 
                      try { | 
            
            
              | 4311 | 
                          $plugin->post_renewal_action( $params );  | 
            
            
              | 4312 | 
                      }  | 
            
            
              | 4313 | 
                      catch { | 
            
            
              | 4314 | 
                          warn "$_";  | 
            
            
              | 4315 | 
                      };  | 
            
            
              | 4316 | 
                  }  | 
            
            
              | 4317 | 
              }  | 
            
        
          | 4276 | 
           | 
          4318 | 
           | 
        
        
          | 4277 | 
          1;  | 
          4319 | 
          1;  | 
        
        
          | 4278 | 
           | 
          4320 | 
           | 
        
            
              | 4279 | 
              -   | 
               | 
               |