Fix for 1863: Result list for 'scan' index searches incorrect after first page
[koha_fer] / catalogue / moredetail.pl
index 8d30c76..76ec022 100755 (executable)
@@ -94,6 +94,17 @@ foreach my $item (@items){
     $item->{'datelastseen'} = format_date($item->{'datelastseen'});
     $item->{'ordernumber'} = $ordernum;
     $item->{'booksellerinvoicenumber'} = $order->{'booksellerinvoicenumber'};
+       if ($item->{notforloantext} or $item->{itemlost} or $item->{damaged} or $item->{wthdrawn}) {
+               $item->{status_advisory} = 1;
+       }
+
+    if (C4::Context->preference("IndependantBranches")) {
+        #verifying rights
+        my $userenv = C4::Context->userenv();
+        unless (($userenv->{'flags'} == 1) or ($userenv->{'branch'} eq $item->{'homebranch'})) {
+                $item->{'nomod'}=1;
+        }
+    }
     $item->{'homebranchname'} = GetBranchName($item->{'homebranch'});
     $item->{'holdingbranchname'} = GetBranchName($item->{'holdingbranch'});
     if ($item->{'onloan'} eq ''){