| Lines 27-32
          use C4::Circulation;
      
      
        Link Here | 
        
          | 27 | use C4::Items qw(GetBarcodeFromItemnumber GetItem ModItem); | 27 | use C4::Items qw(GetBarcodeFromItemnumber GetItem ModItem); | 
        
          | 28 | use C4::Context; | 28 | use C4::Context; | 
        
          | 29 | use C4::Auth qw(check_cookie_auth); | 29 | use C4::Auth qw(check_cookie_auth); | 
            
              |  |  | 30 | use Koha::Checkouts; | 
        
          | 30 |  | 31 |  | 
        
          | 31 | my $input = new CGI; | 32 | my $input = new CGI; | 
        
          | 32 |  | 33 |  | 
  
    | Lines 73-85
          if ( C4::Context->preference("ReturnToShelvingCart") ) {
      
      
        Link Here | 
        
          | 73 |     ModItem( $item, $item->{'biblionumber'}, $item->{'itemnumber'} ); | 74 |     ModItem( $item, $item->{'biblionumber'}, $item->{'itemnumber'} ); | 
        
          | 74 | } | 75 | } | 
        
          | 75 |  | 76 |  | 
          
            
              | 76 | my $dbh = C4::Context->dbh; | 77 | my $checkout = Koha::Checkouts->find({ itemnumber => $itemnumber }); | 
            
              | 77 | my $query = "SELECT note FROM issues WHERE itemnumber = ?"; | 78 | $data->{patronnote} = $checkout ? $checkout->note : q||; | 
            
              | 78 | my $sth = $dbh->prepare($query); |  |  | 
            
              | 79 | $sth->execute($itemnumber); | 
            
              | 80 | my $issue = $sth->fetchrow_hashref; | 
            
              | 81 | my $patronnote = $issue->{note}; | 
            
              | 82 | $data->{patronnote} = $patronnote; | 
        
          | 83 |  | 79 |  | 
        
          | 84 | ( $data->{returned} ) = AddReturn( $barcode, $branchcode, $exempt_fine ); | 80 | ( $data->{returned} ) = AddReturn( $barcode, $branchcode, $exempt_fine ); | 
        
          | 85 |  | 81 |  | 
            
              | 86 | -  |  |  |