Lines 2999-3006
sub CanBookBeRenewed {
Link Here
|
2999 |
my $final_unseen_renewal = 0; |
2999 |
my $final_unseen_renewal = 0; |
3000 |
|
3000 |
|
3001 |
# override_limit will override anything else except on_reserve |
3001 |
# override_limit will override anything else except on_reserve |
|
|
3002 |
my $branchcode = _GetCircControlBranch( $item, $patron ); |
3002 |
unless ( $override_limit ){ |
3003 |
unless ( $override_limit ){ |
3003 |
my $branchcode = _GetCircControlBranch( $item, $patron ); |
|
|
3004 |
my $issuing_rule = Koha::CirculationRules->get_effective_rules( |
3004 |
my $issuing_rule = Koha::CirculationRules->get_effective_rules( |
3005 |
{ |
3005 |
{ |
3006 |
categorycode => $patron->categorycode, |
3006 |
categorycode => $patron->categorycode, |
Lines 3120-3125
sub CanBookBeRenewed {
Link Here
|
3120 |
} |
3120 |
} |
3121 |
} |
3121 |
} |
3122 |
|
3122 |
|
|
|
3123 |
# CHECK FOR BOOKINGS |
3124 |
my $startdate = |
3125 |
( C4::Context->preference('RenewalPeriodBase') eq 'date_due' ) |
3126 |
? dt_from_string( $issue->date_due, 'sql' ) |
3127 |
: dt_from_string(); |
3128 |
my $datedue = CalcDateDue( $startdate, $item->effective_itemtype, $branchcode, $patron, 'is a renewal' ); |
3129 |
if ( |
3130 |
my $booking = $item->find_booking( |
3131 |
{ checkout_date => $startdate, due_date => $datedue, patron_id => $patron->borrowernumber } |
3132 |
) |
3133 |
) |
3134 |
{ |
3135 |
return ( 0, 'booked' ) unless ( $booking->patron_id == $patron->borrowernumber ); |
3136 |
} |
3137 |
|
3123 |
if ( $auto_renew eq 'auto_too_soon' ) { |
3138 |
if ( $auto_renew eq 'auto_too_soon' ) { |
3124 |
|
3139 |
|
3125 |
# If its cron, tell it it's too soon for a an auto renewal |
3140 |
# If its cron, tell it it's too soon for a an auto renewal |
3126 |
- |
|
|