Lines 800-825
sub CanBookBeIssued {
Link Here
|
800 |
$alerts{OTHER_CHARGES} = sprintf( "%.2f", $other_charges ); |
800 |
$alerts{OTHER_CHARGES} = sprintf( "%.2f", $other_charges ); |
801 |
} |
801 |
} |
802 |
|
802 |
|
803 |
my ($blocktype, $count) = C4::Members::IsMemberBlocked($borrower->{'borrowernumber'}); |
803 |
my $patron = Koha::Patrons->find( $borrower->{borrowernumber} ); |
804 |
if ($blocktype == -1) { |
804 |
if ( my $debarred_date = $patron->is_debarred ) { |
805 |
## patron has outstanding overdue loans |
805 |
# patron has accrued fine days or has a restriction. $count is a date |
806 |
if ( C4::Context->preference("OverduesBlockCirc") eq 'block'){ |
806 |
if ($debarred_date eq '9999-12-31') { |
807 |
$issuingimpossible{USERBLOCKEDOVERDUE} = $count; |
807 |
$issuingimpossible{USERBLOCKEDNOENDDATE} = $debarred_date; |
808 |
} |
|
|
809 |
elsif ( C4::Context->preference("OverduesBlockCirc") eq 'confirmation'){ |
810 |
$needsconfirmation{USERBLOCKEDOVERDUE} = $count; |
811 |
} |
812 |
} elsif($blocktype == 1) { |
813 |
# patron has accrued fine days or has a restriction. $count is a date |
814 |
if ($count eq '9999-12-31') { |
815 |
$issuingimpossible{USERBLOCKEDNOENDDATE} = $count; |
816 |
} |
808 |
} |
817 |
else { |
809 |
else { |
818 |
$issuingimpossible{USERBLOCKEDWITHENDDATE} = $count; |
810 |
$issuingimpossible{USERBLOCKEDWITHENDDATE} = $debarred_date; |
|
|
811 |
} |
812 |
} elsif ( my $num_overdues = $patron->has_overdues ) { |
813 |
## patron has outstanding overdue loans |
814 |
if ( C4::Context->preference("OverduesBlockCirc") eq 'block'){ |
815 |
$issuingimpossible{USERBLOCKEDOVERDUE} = $num_overdues; |
816 |
} |
817 |
elsif ( C4::Context->preference("OverduesBlockCirc") eq 'confirmation'){ |
818 |
$needsconfirmation{USERBLOCKEDOVERDUE} = $num_overdues; |
819 |
} |
819 |
} |
820 |
} |
820 |
} |
821 |
|
821 |
|
822 |
# |
|
|
823 |
# JB34 CHECKS IF BORROWERS DON'T HAVE ISSUE TOO MANY BOOKS |
822 |
# JB34 CHECKS IF BORROWERS DON'T HAVE ISSUE TOO MANY BOOKS |
824 |
# |
823 |
# |
825 |
my $switch_onsite_checkout = |
824 |
my $switch_onsite_checkout = |
Lines 847-853
sub CanBookBeIssued {
Link Here
|
847 |
# |
846 |
# |
848 |
# CHECKPREVCHECKOUT: CHECK IF ITEM HAS EVER BEEN LENT TO PATRON |
847 |
# CHECKPREVCHECKOUT: CHECK IF ITEM HAS EVER BEEN LENT TO PATRON |
849 |
# |
848 |
# |
850 |
my $patron = Koha::Patrons->find($borrower->{borrowernumber}); |
849 |
$patron = Koha::Patrons->find($borrower->{borrowernumber}); |
851 |
my $wants_check = $patron->wants_check_for_previous_checkout; |
850 |
my $wants_check = $patron->wants_check_for_previous_checkout; |
852 |
$needsconfirmation{PREVISSUE} = 1 |
851 |
$needsconfirmation{PREVISSUE} = 1 |
853 |
if ($wants_check and $patron->do_check_for_previous_checkout($item)); |
852 |
if ($wants_check and $patron->do_check_for_previous_checkout($item)); |