Lines 682-688
sub CanBookBeIssued {
Link Here
|
682 |
|
682 |
|
683 |
my $item = GetItem(undef, $barcode ); |
683 |
my $item = GetItem(undef, $barcode ); |
684 |
my $issue = Koha::Checkouts->find( { itemnumber => $item->{itemnumber} } ); |
684 |
my $issue = Koha::Checkouts->find( { itemnumber => $item->{itemnumber} } ); |
685 |
my $biblioitem = GetBiblioItemData($item->{biblioitemnumber}); |
685 |
my $biblio = Koha::Biblios->( $item->{biblionumber} ); |
|
|
686 |
my $biblioitem = $biblio->biblioitem; |
686 |
my $effective_itemtype = $item->{itype}; # GetItem deals with that |
687 |
my $effective_itemtype = $item->{itype}; # GetItem deals with that |
687 |
my $dbh = C4::Context->dbh; |
688 |
my $dbh = C4::Context->dbh; |
688 |
|
689 |
|
Lines 947-953
sub CanBookBeIssued {
Link Here
|
947 |
} |
948 |
} |
948 |
} |
949 |
} |
949 |
} |
950 |
} |
950 |
elsif ($biblioitem->{'notforloan'} == 1){ |
951 |
elsif ($biblioitem->notforloan == 1){ |
951 |
if (!C4::Context->preference("AllowNotForLoanOverride")) { |
952 |
if (!C4::Context->preference("AllowNotForLoanOverride")) { |
952 |
$issuingimpossible{NOT_FOR_LOAN} = 1; |
953 |
$issuingimpossible{NOT_FOR_LOAN} = 1; |
953 |
$issuingimpossible{itemtype_notforloan} = $effective_itemtype; |
954 |
$issuingimpossible{itemtype_notforloan} = $effective_itemtype; |
Lines 1029-1035
sub CanBookBeIssued {
Link Here
|
1029 |
} |
1030 |
} |
1030 |
|
1031 |
|
1031 |
## CHECK AGE RESTRICTION |
1032 |
## CHECK AGE RESTRICTION |
1032 |
my $agerestriction = $biblioitem->{'agerestriction'}; |
1033 |
my $agerestriction = $biblioitem->agerestriction; |
1033 |
my ($restriction_age, $daysToAgeRestriction) = GetAgeRestriction( $agerestriction, $borrower ); |
1034 |
my ($restriction_age, $daysToAgeRestriction) = GetAgeRestriction( $agerestriction, $borrower ); |
1034 |
if ( $daysToAgeRestriction && $daysToAgeRestriction > 0 ) { |
1035 |
if ( $daysToAgeRestriction && $daysToAgeRestriction > 0 ) { |
1035 |
if ( C4::Context->preference('AgeRestrictionOverride') ) { |
1036 |
if ( C4::Context->preference('AgeRestrictionOverride') ) { |