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->( $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 929-935
sub CanBookBeIssued {
Link Here
|
929 |
} |
930 |
} |
930 |
} |
931 |
} |
931 |
} |
932 |
} |
932 |
elsif ($biblioitem->{'notforloan'} == 1){ |
933 |
elsif ($biblioitem->notforloan == 1){ |
933 |
if (!C4::Context->preference("AllowNotForLoanOverride")) { |
934 |
if (!C4::Context->preference("AllowNotForLoanOverride")) { |
934 |
$issuingimpossible{NOT_FOR_LOAN} = 1; |
935 |
$issuingimpossible{NOT_FOR_LOAN} = 1; |
935 |
$issuingimpossible{itemtype_notforloan} = $effective_itemtype; |
936 |
$issuingimpossible{itemtype_notforloan} = $effective_itemtype; |
Lines 1011-1017
sub CanBookBeIssued {
Link Here
|
1011 |
} |
1012 |
} |
1012 |
|
1013 |
|
1013 |
## CHECK AGE RESTRICTION |
1014 |
## CHECK AGE RESTRICTION |
1014 |
my $agerestriction = $biblioitem->{'agerestriction'}; |
1015 |
my $agerestriction = $biblioitem->agerestriction; |
1015 |
my ($restriction_age, $daysToAgeRestriction) = GetAgeRestriction( $agerestriction, $patron->unblessed ); |
1016 |
my ($restriction_age, $daysToAgeRestriction) = GetAgeRestriction( $agerestriction, $patron->unblessed ); |
1016 |
if ( $daysToAgeRestriction && $daysToAgeRestriction > 0 ) { |
1017 |
if ( $daysToAgeRestriction && $daysToAgeRestriction > 0 ) { |
1017 |
if ( C4::Context->preference('AgeRestrictionOverride') ) { |
1018 |
if ( C4::Context->preference('AgeRestrictionOverride') ) { |