|
Lines 2965-2970
sub CanBookBeRenewed {
Link Here
|
| 2965 |
# override_limit will override anything else except on_reserve |
2965 |
# override_limit will override anything else except on_reserve |
| 2966 |
unless ( $override_limit ){ |
2966 |
unless ( $override_limit ){ |
| 2967 |
my $branchcode = _GetCircControlBranch( $item->unblessed, $patron->unblessed ); |
2967 |
my $branchcode = _GetCircControlBranch( $item->unblessed, $patron->unblessed ); |
|
|
2968 |
|
| 2969 |
( $auto_renew, $soonest ) = _CanBookBeAutoRenewed({ |
| 2970 |
patron => $patron, |
| 2971 |
item => $item, |
| 2972 |
branchcode => $branchcode, |
| 2973 |
issue => $issue |
| 2974 |
}); |
| 2975 |
return ( 0, $auto_renew, { soonest_renew_date => $soonest } ) if $auto_renew =~ 'auto_too_soon' && $cron; |
| 2976 |
# cron wants 'too_soon' over 'on_reserve' for performance and to avoid |
| 2977 |
# extra notices being sent. Cron also implies no override |
| 2978 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_account_expired'; |
| 2979 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_too_late'; |
| 2980 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_too_much_oweing'; |
| 2981 |
|
| 2968 |
my $issuing_rule = Koha::CirculationRules->get_effective_rules( |
2982 |
my $issuing_rule = Koha::CirculationRules->get_effective_rules( |
| 2969 |
{ |
2983 |
{ |
| 2970 |
categorycode => $patron->categorycode, |
2984 |
categorycode => $patron->categorycode, |
|
Lines 2997-3014
sub CanBookBeRenewed {
Link Here
|
| 2997 |
return ( 0, 'overdue'); |
3011 |
return ( 0, 'overdue'); |
| 2998 |
} |
3012 |
} |
| 2999 |
|
3013 |
|
| 3000 |
( $auto_renew, $soonest ) = _CanBookBeAutoRenewed({ |
|
|
| 3001 |
patron => $patron, |
| 3002 |
item => $item, |
| 3003 |
branchcode => $branchcode, |
| 3004 |
issue => $issue |
| 3005 |
}); |
| 3006 |
return ( 0, $auto_renew, { soonest_renew_date => $soonest } ) if $auto_renew =~ 'auto_too_soon' && $cron; |
| 3007 |
# cron wants 'too_soon' over 'on_reserve' for performance and to avoid |
| 3008 |
# extra notices being sent. Cron also implies no override |
| 3009 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_account_expired'; |
| 3010 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_too_late'; |
| 3011 |
return ( 0, $auto_renew ) if $auto_renew =~ 'auto_too_much_oweing'; |
| 3012 |
} |
3014 |
} |
| 3013 |
|
3015 |
|
| 3014 |
if ( C4::Context->preference('UseRecalls') ) { |
3016 |
if ( C4::Context->preference('UseRecalls') ) { |
| 3015 |
- |
|
|