Bug 17698: (follow-up) Fixing things in Comment 57
[koha.git] / circ / returns.pl
index a82bdc1..103d290 100755 (executable)
@@ -52,6 +52,7 @@ use Koha::BiblioFrameworks;
 use Koha::Holds;
 use Koha::Items;
 use Koha::Patrons;
+use Koha::Checkouts;
 
 my $query = new CGI;
 
@@ -579,6 +580,8 @@ foreach ( sort { $a <=> $b } keys %returneditems ) {
     push @riloop, \%ri;
 }
 
+my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
+
 $template->param(
     riloop         => \@riloop,
     printer        => $printer,
@@ -589,6 +592,7 @@ $template->param(
     forgivemanualholdsexpire => $forgivemanualholdsexpire,
     overduecharges => $overduecharges,
     AudioAlerts        => C4::Context->preference("AudioAlerts"),
+    pending_checkout_notes => $pending_checkout_notes,
 );
 
 $itemnumber = GetItemnumberFromBarcode( $barcode );