Lines 2296-2305
sub AddReturn {
Link Here
|
2296 |
if ( $issue and $issue->is_overdue($return_date) ) { |
2296 |
if ( $issue and $issue->is_overdue($return_date) ) { |
2297 |
# fix fine days |
2297 |
# fix fine days |
2298 |
my ($debardate,$reminder) = _debar_user_on_return( $patron_unblessed, $item->unblessed, dt_from_string($issue->date_due), $return_date ); |
2298 |
my ($debardate,$reminder) = _debar_user_on_return( $patron_unblessed, $item->unblessed, dt_from_string($issue->date_due), $return_date ); |
2299 |
if ($reminder){ |
2299 |
if ($debardate and $debardate ne "9999-12-31") { |
2300 |
$messages->{'PrevDebarred'} = $debardate; |
2300 |
if ($reminder){ |
2301 |
} else { |
2301 |
$messages->{'PrevDebarred'} = $debardate; |
2302 |
$messages->{'Debarred'} = $debardate if $debardate; |
2302 |
} else { |
|
|
2303 |
$messages->{'Debarred'} = $debardate; |
2304 |
} |
2305 |
} elsif ($patron->debarred) { |
2306 |
if ( $patron->debarred eq "9999-12-31") { |
2307 |
$messages->{'ForeverDebarred'} = $patron->debarred; |
2308 |
} else { |
2309 |
my $borrower_debar_dt = dt_from_string( $patron->debarred ); |
2310 |
$borrower_debar_dt->truncate(to => 'day'); |
2311 |
my $today_dt = $return_date->clone()->truncate(to => 'day'); |
2312 |
if ( DateTime->compare( $borrower_debar_dt, $today_dt ) != -1 ) { |
2313 |
$messages->{'PrevDebarred'} = $patron->debarred; |
2314 |
} |
2315 |
} |
2303 |
} |
2316 |
} |
2304 |
# there's no overdue on the item but borrower had been previously debarred |
2317 |
# there's no overdue on the item but borrower had been previously debarred |
2305 |
} elsif ( $issue->date_due and $patron->debarred ) { |
2318 |
} elsif ( $issue->date_due and $patron->debarred ) { |
2306 |
- |
|
|