|
Lines 2956-2961
sub CanBookBeRenewed {
Link Here
|
| 2956 |
# override_limit will override anything else except on_reserve |
2956 |
# override_limit will override anything else except on_reserve |
| 2957 |
unless ( $override_limit ){ |
2957 |
unless ( $override_limit ){ |
| 2958 |
my $branchcode = _GetCircControlBranch( $item, $patron ); |
2958 |
my $branchcode = _GetCircControlBranch( $item, $patron ); |
|
|
2959 |
|
| 2960 |
( $auto_renew, $soonest ) = _CanBookBeAutoRenewed({ |
| 2961 |
patron => $patron, |
| 2962 |
item => $item, |
| 2963 |
branchcode => $branchcode, |
| 2964 |
issue => $issue |
| 2965 |
}); |
| 2966 |
return ( 0, $auto_renew, { soonest_renew_date => $soonest } ) if $auto_renew =~ 'auto_too_soon' && $cron; |
| 2967 |
# cron wants 'too_soon' over 'on_reserve' for performance and to avoid |
| 2968 |
# extra notices being sent. Cron also implies no override |
| 2969 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_account_expired'; |
| 2970 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_too_late'; |
| 2971 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_too_much_oweing'; |
| 2972 |
|
| 2959 |
my $issuing_rule = Koha::CirculationRules->get_effective_rules( |
2973 |
my $issuing_rule = Koha::CirculationRules->get_effective_rules( |
| 2960 |
{ |
2974 |
{ |
| 2961 |
categorycode => $patron->categorycode, |
2975 |
categorycode => $patron->categorycode, |
|
Lines 2988-3005
sub CanBookBeRenewed {
Link Here
|
| 2988 |
return ( 0, 'overdue'); |
3002 |
return ( 0, 'overdue'); |
| 2989 |
} |
3003 |
} |
| 2990 |
|
3004 |
|
| 2991 |
( $auto_renew, $soonest ) = _CanBookBeAutoRenewed({ |
|
|
| 2992 |
patron => $patron, |
| 2993 |
item => $item, |
| 2994 |
branchcode => $branchcode, |
| 2995 |
issue => $issue |
| 2996 |
}); |
| 2997 |
return ( 0, $auto_renew, { soonest_renew_date => $soonest } ) if $auto_renew =~ 'auto_too_soon' && $cron; |
| 2998 |
# cron wants 'too_soon' over 'on_reserve' for performance and to avoid |
| 2999 |
# extra notices being sent. Cron also implies no override |
| 3000 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_account_expired'; |
| 3001 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_too_late'; |
| 3002 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_too_much_oweing'; |
| 3003 |
} |
3005 |
} |
| 3004 |
|
3006 |
|
| 3005 |
if ( C4::Context->preference('UseRecalls') ) { |
3007 |
if ( C4::Context->preference('UseRecalls') ) { |
| 3006 |
- |
|
|