MT 1816: Granular permissions for the serials module
[koha.git] / reports / reservereport.pl
index fcbaa28..fa38964 100755 (executable)
 
 use strict;
 use C4::Stats;
-use C4::Date;
+use C4::Dates qw/format_date/;
 use CGI;
 use C4::Output;
-use HTML::Template;
+use C4::Branch; # GetBranches
 use C4::Auth;
-use C4::Interface::CGI::Output;
 use C4::Koha;
+use C4::Items;
 
 
 my $input = new CGI;
@@ -51,7 +51,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
         query           => $input,
         type            => "intranet",
         authnotrequired => 0,
-        flagsrequired   => { editcatalogue => 1 },
+        flagsrequired   => { reports => 1 },
         debug           => 1,
     }
 );
@@ -95,7 +95,7 @@ for ( my $i = 0 ; $i < $count ; $i++ ) {
         # FIXME still need to shift the text to the template so its translateable
         if ( $data->[$i]) {
             # find if its on issue
-            my @items = &ItemInfo( undef, $line{'biblionumber'}, 'intra' );
+            my @items = GetItemsInfo($line{'biblionumber'}, 'intra' );
             my $onissue = 0;
             foreach my $item (@items) {
                 if ( $item->{'datedue'} eq 'Reserved' ) {