Lines 3000-3005
sub CanBookBeRenewed {
Link Here
|
3000 |
# override_limit will override anything else except on_reserve |
3000 |
# override_limit will override anything else except on_reserve |
3001 |
unless ( $override_limit ){ |
3001 |
unless ( $override_limit ){ |
3002 |
my $branchcode = _GetCircControlBranch( $item, $patron ); |
3002 |
my $branchcode = _GetCircControlBranch( $item, $patron ); |
|
|
3003 |
|
3004 |
( $auto_renew, $soonest ) = _CanBookBeAutoRenewed({ |
3005 |
patron => $patron, |
3006 |
item => $item, |
3007 |
branchcode => $branchcode, |
3008 |
issue => $issue |
3009 |
}); |
3010 |
return ( 0, $auto_renew, { soonest_renew_date => $soonest } ) if $auto_renew =~ 'auto_too_soon' && $cron; |
3011 |
# cron wants 'too_soon' over 'on_reserve' for performance and to avoid |
3012 |
# extra notices being sent. Cron also implies no override |
3013 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_account_expired'; |
3014 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_too_late'; |
3015 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_too_much_oweing'; |
3016 |
|
3003 |
my $issuing_rule = Koha::CirculationRules->get_effective_rules( |
3017 |
my $issuing_rule = Koha::CirculationRules->get_effective_rules( |
3004 |
{ |
3018 |
{ |
3005 |
categorycode => $patron->categorycode, |
3019 |
categorycode => $patron->categorycode, |
Lines 3036-3053
sub CanBookBeRenewed {
Link Here
|
3036 |
return ( 0, 'overdue'); |
3050 |
return ( 0, 'overdue'); |
3037 |
} |
3051 |
} |
3038 |
|
3052 |
|
3039 |
( $auto_renew, $soonest ) = _CanBookBeAutoRenewed({ |
|
|
3040 |
patron => $patron, |
3041 |
item => $item, |
3042 |
branchcode => $branchcode, |
3043 |
issue => $issue |
3044 |
}); |
3045 |
return ( 0, $auto_renew, { soonest_renew_date => $soonest } ) if $auto_renew =~ 'auto_too_soon' && $cron; |
3046 |
# cron wants 'too_soon' over 'on_reserve' for performance and to avoid |
3047 |
# extra notices being sent. Cron also implies no override |
3048 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_account_expired'; |
3049 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_too_late'; |
3050 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_too_much_oweing'; |
3051 |
} |
3053 |
} |
3052 |
|
3054 |
|
3053 |
if ( C4::Context->preference('UseRecalls') ) { |
3055 |
if ( C4::Context->preference('UseRecalls') ) { |
3054 |
- |
|
|