| Lines 35-41
          use C4::Message;
      
      
        Link Here | 
        
          | 35 | use C4::Debug; | 35 | use C4::Debug; | 
        
          | 36 | use C4::Log; # logaction | 36 | use C4::Log; # logaction | 
        
          | 37 | use C4::Overdues qw(CalcFine UpdateFine get_chargeable_units); | 37 | use C4::Overdues qw(CalcFine UpdateFine get_chargeable_units); | 
            
              | 38 | use C4::RotatingCollections; |  |  | 
        
          | 39 | use Algorithm::CheckDigits; | 38 | use Algorithm::CheckDigits; | 
        
          | 40 |  | 39 |  | 
        
          | 41 | use Data::Dumper; | 40 | use Data::Dumper; | 
  
    | Lines 56-61
          use Koha::RefundLostItemFeeRule;
      
      
        Link Here | 
        
          | 56 | use Koha::RefundLostItemFeeRules; | 55 | use Koha::RefundLostItemFeeRules; | 
        
          | 57 | use Koha::Account::Lines; | 56 | use Koha::Account::Lines; | 
        
          | 58 | use Koha::Account::Offsets; | 57 | use Koha::Account::Offsets; | 
            
              |  |  | 58 | use Koha::RotatingCollection::Trackings; | 
        
          | 59 | use Carp; | 59 | use Carp; | 
        
          | 60 | use List::MoreUtils qw( uniq ); | 60 | use List::MoreUtils qw( uniq ); | 
        
          | 61 | use Scalar::Util qw( looks_like_number ); | 61 | use Scalar::Util qw( looks_like_number ); | 
  
    | Lines 1966-1972
          sub AddReturn {
      
      
        Link Here | 
        
          | 1966 |     my ($datesent,$frombranch,$tobranch) = GetTransfers( $item->{'itemnumber'} ); | 1966 |     my ($datesent,$frombranch,$tobranch) = GetTransfers( $item->{'itemnumber'} ); | 
        
          | 1967 |  | 1967 |  | 
        
          | 1968 |     # if we have a transfer to do, we update the line of transfers with the datearrived | 1968 |     # if we have a transfer to do, we update the line of transfers with the datearrived | 
          
            
              | 1969 |     my $is_in_rotating_collection = C4::RotatingCollections::isItemInAnyCollection( $item->{'itemnumber'} ); | 1969 |     my $is_in_rotating_collection = Koha::RotatingCollection::Trackings->search( { itemnumber => $item->{'itemnumber'} } )->count; | 
        
          | 1970 |     if ($datesent) { | 1970 |     if ($datesent) { | 
        
          | 1971 |         if ( $tobranch eq $branch ) { | 1971 |         if ( $tobranch eq $branch ) { | 
        
          | 1972 |             my $sth = C4::Context->dbh->prepare( | 1972 |             my $sth = C4::Context->dbh->prepare( |