|
Lines 2753-2759
sub CanBookBeRenewed {
Link Here
|
| 2753 |
|
2753 |
|
| 2754 |
my $patron = $issue->patron or return; |
2754 |
my $patron = $issue->patron or return; |
| 2755 |
|
2755 |
|
| 2756 |
# override_limit will override anything else except on_reserve |
2756 |
# override_limit will override anything else except on_reserve or too_soon |
| 2757 |
unless ( $override_limit ){ |
2757 |
unless ( $override_limit ){ |
| 2758 |
my $branchcode = _GetCircControlBranch( $item->unblessed, $patron->unblessed ); |
2758 |
my $branchcode = _GetCircControlBranch( $item->unblessed, $patron->unblessed ); |
| 2759 |
my $issuing_rule = Koha::CirculationRules->get_effective_rules( |
2759 |
my $issuing_rule = Koha::CirculationRules->get_effective_rules( |
|
Lines 2800-2805
sub CanBookBeRenewed {
Link Here
|
| 2800 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_too_much_oweing'; |
2800 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_too_much_oweing'; |
| 2801 |
} |
2801 |
} |
| 2802 |
|
2802 |
|
|
|
2803 |
return ( 0, $auto_renew ) if $auto_renew =~ 'too_soon' && $cron; |
| 2804 |
# cron wants 'too_soon' over 'on_reserve' for performance and to avoid |
| 2805 |
# extra notices being sent |
| 2806 |
|
| 2803 |
my ( $resfound, $resrec, $possible_reserves ) = C4::Reserves::CheckReserves($itemnumber); |
2807 |
my ( $resfound, $resrec, $possible_reserves ) = C4::Reserves::CheckReserves($itemnumber); |
| 2804 |
|
2808 |
|
| 2805 |
# If next hold is non priority, then check if any hold with priority (non_priority = 0) exists for the same biblionumber. |
2809 |
# If next hold is non priority, then check if any hold with priority (non_priority = 0) exists for the same biblionumber. |
|
Lines 2858-2870
sub CanBookBeRenewed {
Link Here
|
| 2858 |
} |
2862 |
} |
| 2859 |
} |
2863 |
} |
| 2860 |
} |
2864 |
} |
| 2861 |
if( $cron ) { #The cron wants to return 'too_soon' over 'on_reserve' |
2865 |
|
| 2862 |
return ( 0, $auto_renew ) if $auto_renew =~ 'too_soon';#$auto_renew ne "no" && $auto_renew ne "ok"; |
2866 |
return ( 0, "on_reserve" ) if $resfound; # '' when no hold was found |
| 2863 |
return ( 0, "on_reserve" ) if $resfound; # '' when no hold was found |
2867 |
return ( 0, $auto_renew ) if $auto_renew =~ 'too_soon';#$auto_renew ne "no" && $auto_renew ne "ok"; |
| 2864 |
} else { # For other purposes we want 'on_reserve' before 'too_soon' |
|
|
| 2865 |
return ( 0, "on_reserve" ) if $resfound; # '' when no hold was found |
| 2866 |
return ( 0, $auto_renew ) if $auto_renew =~ 'too_soon';#$auto_renew ne "no" && $auto_renew ne "ok"; |
| 2867 |
} |
| 2868 |
|
2868 |
|
| 2869 |
return ( 0, "auto_renew" ) if $auto_renew eq "ok" && !$override_limit; # 0 if auto-renewal should not succeed |
2869 |
return ( 0, "auto_renew" ) if $auto_renew eq "ok" && !$override_limit; # 0 if auto-renewal should not succeed |
| 2870 |
|
2870 |
|
| 2871 |
- |
|
|