Bug 11148: (follow-up) add more test cases
[koha_fer] / acqui / neworderempty.pl
index b1c9afa..9fdf032 100755 (executable)
@@ -229,10 +229,11 @@ for my $curr ( @rates ) {
 }
 
 # build branches list
-my $onlymine=C4::Context->preference('IndependantBranches') && 
-            C4::Context->userenv && 
-            C4::Context->userenv->{flags}!=1 && 
-            C4::Context->userenv->{branch};
+my $onlymine =
+     C4::Context->preference('IndependentBranches')
+  && C4::Context->userenv
+  && !C4::Context->IsSuperLibrarian()
+  && C4::Context->userenv->{branch};
 my $branches = GetBranches($onlymine);
 my @branchloop;
 foreach my $thisbranch ( sort {$branches->{$a}->{'branchname'} cmp $branches->{$b}->{'branchname'}} keys %$branches ) {
@@ -379,7 +380,6 @@ $template->param(
     biblionumber         => $biblionumber,
     uncertainprice       => $data->{'uncertainprice'},
     authorisedbyname     => $borrower->{'firstname'} . " " . $borrower->{'surname'},
-    biblioitemnumber     => $data->{'biblioitemnumber'},
     discount_2dp         => sprintf( "%.2f",  $bookseller->{'discount'} ) ,   # for display
     discount             => $bookseller->{'discount'},
     orderdiscount_2dp    => sprintf( "%.2f", $data->{'discount'} || 0 ),
@@ -414,6 +414,7 @@ $template->param(
     barcode_subfield => $barcode_subfield,
     import_batch_id  => $import_batch_id,
     subscriptionid   => $subscriptionid,
+    acqcreate        => C4::Context->preference("AcqCreateItem") eq "ordering" ? 1 : "",
     (uc(C4::Context->preference("marcflavour"))) => 1
 );