Lines 669-675
sub CanBookBeIssued {
Link Here
|
669 |
|
669 |
|
670 |
my $item = GetItem(undef, $barcode ); |
670 |
my $item = GetItem(undef, $barcode ); |
671 |
my $issue = Koha::Checkouts->find( { itemnumber => $item->{itemnumber} } ); |
671 |
my $issue = Koha::Checkouts->find( { itemnumber => $item->{itemnumber} } ); |
672 |
my $biblioitem = GetBiblioItemData($item->{biblioitemnumber}); |
672 |
my $biblio = Koha::Biblios->find( $item->{biblionumber} ); |
|
|
673 |
my $biblioitem = $biblio->biblioitem; |
673 |
my $effective_itemtype = $item->{itype}; # GetItem deals with that |
674 |
my $effective_itemtype = $item->{itype}; # GetItem deals with that |
674 |
my $dbh = C4::Context->dbh; |
675 |
my $dbh = C4::Context->dbh; |
675 |
my $patron_unblessed = $patron->unblessed; |
676 |
my $patron_unblessed = $patron->unblessed; |
Lines 927-933
sub CanBookBeIssued {
Link Here
|
927 |
} |
928 |
} |
928 |
} |
929 |
} |
929 |
} |
930 |
} |
930 |
elsif ($biblioitem->{'notforloan'} == 1){ |
931 |
elsif ($biblioitem->notforloan == 1){ |
931 |
if (!C4::Context->preference("AllowNotForLoanOverride")) { |
932 |
if (!C4::Context->preference("AllowNotForLoanOverride")) { |
932 |
$issuingimpossible{NOT_FOR_LOAN} = 1; |
933 |
$issuingimpossible{NOT_FOR_LOAN} = 1; |
933 |
$issuingimpossible{itemtype_notforloan} = $effective_itemtype; |
934 |
$issuingimpossible{itemtype_notforloan} = $effective_itemtype; |
Lines 1009-1015
sub CanBookBeIssued {
Link Here
|
1009 |
} |
1010 |
} |
1010 |
|
1011 |
|
1011 |
## CHECK AGE RESTRICTION |
1012 |
## CHECK AGE RESTRICTION |
1012 |
my $agerestriction = $biblioitem->{'agerestriction'}; |
1013 |
my $agerestriction = $biblioitem->agerestriction; |
1013 |
my ($restriction_age, $daysToAgeRestriction) = GetAgeRestriction( $agerestriction, $patron->unblessed ); |
1014 |
my ($restriction_age, $daysToAgeRestriction) = GetAgeRestriction( $agerestriction, $patron->unblessed ); |
1014 |
if ( $daysToAgeRestriction && $daysToAgeRestriction > 0 ) { |
1015 |
if ( $daysToAgeRestriction && $daysToAgeRestriction > 0 ) { |
1015 |
if ( C4::Context->preference('AgeRestrictionOverride') ) { |
1016 |
if ( C4::Context->preference('AgeRestrictionOverride') ) { |