[Koha-patches] [PATCH] bug 2893: extend conditions handled by AllowNotForLoanOverride
Galen Charlton
galen.charlton at liblime.com
Wed Jun 17 15:00:57 CEST 2009
Prior to this patch, turning AllowNotForLoanOverride on
allowed the circ operator to permit the loan of an
item who's individual not-for-loan flag was set, but did
not allow the loan of an item whose item type's not-for-loan
flag was set. This patch extends the definition of the
system preference so that both cases are covered.
---
C4/Circulation.pm | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/C4/Circulation.pm b/C4/Circulation.pm
index 07e0b39..f4cea86 100644
--- a/C4/Circulation.pm
+++ b/C4/Circulation.pm
@@ -771,12 +771,20 @@ sub CanBookBeIssued {
$sth->execute($item->{'itemtype'});
my $notforloan=$sth->fetchrow_hashref();
$sth->finish();
- if ($notforloan->{'notforloan'} == 1){
- $issuingimpossible{NOT_FOR_LOAN} = 1;
+ if ($notforloan->{'notforloan'}) {
+ if (!C4::Context->preference("AllowNotForLoanOverride")) {
+ $issuingimpossible{NOT_FOR_LOAN} = 1;
+ } else {
+ $needsconfirmation{NOT_FOR_LOAN_FORCING} = 1;
+ }
}
}
elsif ($biblioitem->{'notforloan'} == 1){
- $issuingimpossible{NOT_FOR_LOAN} = 1;
+ if (!C4::Context->preference("AllowNotForLoanOverride")) {
+ $issuingimpossible{NOT_FOR_LOAN} = 1;
+ } else {
+ $needsconfirmation{NOT_FOR_LOAN_FORCING} = 1;
+ }
}
}
if ( $item->{'wthdrawn'} && $item->{'wthdrawn'} == 1 )
--
1.5.6.5
More information about the Koha-patches
mailing list