Bug 10955 - Add ability to skip deletions in zebraqueue
[koha_fer] / C4 / Circulation.pm
index 34aa358..f8b204a 100644 (file)
@@ -896,7 +896,7 @@ sub CanBookBeIssued {
     }
     if ( C4::Context->preference("IndependentBranches") ) {
         my $userenv = C4::Context->userenv;
-        if ( ($userenv) && ( $userenv->{flags} % 2 != 1 ) ) {
+        unless ( C4::Context->IsSuperLibrarian() ) {
             if ( $item->{C4::Context->preference("HomeOrHoldingBranch")} ne $userenv->{branch} ){
                 $issuingimpossible{ITEMNOTSAMEBRANCH} = 1;
                 $issuingimpossible{'itemhomebranch'} = $item->{C4::Context->preference("HomeOrHoldingBranch")};
@@ -2433,7 +2433,7 @@ FROM issues
 LEFT JOIN items USING (itemnumber)
 LEFT OUTER JOIN branches USING (branchcode)
 WHERE returndate is NULL
-HAVING days_until_due > 0 AND days_until_due < ?
+HAVING days_until_due >= 0 AND days_until_due <= ?
 END_SQL
 
     my @bind_parameters = ( $params->{'days_in_advance'} );