Bug 21719: Fix typos
[koha.git] / circ / checkout-notes.pl
index ceb52c9..97fb925 100755 (executable)
@@ -37,12 +37,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     }
 );
 
-my $schema = Koha::Database->new()->schema();
-my @notes = $schema->resultset('Issue')->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] });
-$template->param(
-    notes     => \@notes,
-);
-
 my $action;
 foreach (qw( seen notseen )) {
     $action = $_ if ( $query->param("mark_selected-$_") );
@@ -63,9 +57,11 @@ if ( $action eq 'seen' ) {
     }
 }
 
+my $notes = Koha::Checkouts->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] });
 $template->param(
     selected_count => scalar(@issue_ids),
     action         => $action,
+    notes          => $notes,
 );
 
 output_html_with_http_headers $query, $cookie, $template->output;