(bug #3695) allow to limit overdues by categorycode
[koha.git] / opac / opac-suggestions.pl
index b739817..838cd05 100755 (executable)
@@ -98,6 +98,15 @@ my $suggestions_loop =
   &SearchSuggestion( $borrowernumber, $author, $title, $publishercode, $status,
     $suggestedbyme );
 map{ $_->{'branchcodesuggestedby'}=GetBranchInfo($_->{'branchcodesuggestedby'})->[0]->{'branchname'}} @$suggestions_loop;  
+
+foreach my $suggestion(@$suggestions_loop) {
+    if($suggestion->{'suggestedby'} == $borrowernumber) {
+        $suggestion->{'showcheckbox'} = $borrowernumber;
+    } else {
+        $suggestion->{'showcheckbox'} = 0;
+    }
+}
+
 $template->param(
     suggestions_loop => $suggestions_loop,
     title            => $title,