Bug 6050 Make calls to GetItemsInfo consistent
[koha.git] / serials / routing-preview.pl
index 716cced..64849b5 100755 (executable)
@@ -65,7 +65,7 @@ if($ok){
     # get biblio information....
     my $biblio = $subs->{'biblionumber'};
        my ($count2,@bibitems) = GetBiblioItemByBiblioNumber($biblio);
-       my @itemresults = GetItemsInfo($subs->{'biblionumber'}, 'intra');
+       my @itemresults = GetItemsInfo( $subs->{biblionumber} );
        my $branch = $itemresults[0]->{'holdingbranch'};
        my $branchname = GetBranchName($branch);
 
@@ -100,7 +100,7 @@ if($ok){
                                query => $query,
                                type => "intranet",
                                authnotrequired => 0,
-                               flagsrequired => {serials => 1},
+                               flagsrequired => {serials => 'routing'},
                                debug => 1,
                                });
     $template->param("libraryname"=>$branchname);
@@ -110,7 +110,7 @@ if($ok){
                                query => $query,
                                type => "intranet",
                                authnotrequired => 0,
-                               flagsrequired => {serials => 1},
+                               flagsrequired => {serials => 'routing'},
                                debug => 1,
                                });
 }
@@ -136,6 +136,7 @@ $template->param(
     subscriptionid => $subscriptionid,
     memberloop => \@results,
     routingnotes => $routingnotes,
+    hasRouting => check_routing($subscriptionid),
     );
 
 output_html_with_http_headers $query, $cookie, $template->output;