Lines 2400-2418
sub AddReturn {
Link Here
|
2400 |
my $patron = $issue->patron; |
2400 |
my $patron = $issue->patron; |
2401 |
$patron_unblessed = $patron->unblessed; |
2401 |
$patron_unblessed = $patron->unblessed; |
2402 |
} |
2402 |
} |
2403 |
_CalculateAndUpdateFine( |
2403 |
|
2404 |
{ |
2404 |
# Confirm the lost charge came from the most recent patron to return the item |
2405 |
issue => $issue, |
2405 |
# and only charge the fine if so |
2406 |
item => $item->unblessed, |
2406 |
if ( $message->payload->{patron_id} == $patron_unblessed->{borrowernumber} ) { |
2407 |
borrower => $patron_unblessed, |
2407 |
_CalculateAndUpdateFine( |
2408 |
return_date => $return_date |
2408 |
{ |
2409 |
} |
2409 |
issue => $issue, |
2410 |
); |
2410 |
item => $item->unblessed, |
2411 |
_FixOverduesOnReturn( |
2411 |
borrower => $patron_unblessed, |
2412 |
$patron_unblessed->{borrowernumber}, |
2412 |
return_date => $return_date |
2413 |
$item->itemnumber, undef, 'RETURNED' |
2413 |
} |
2414 |
); |
2414 |
); |
2415 |
$messages->{'LostItemFeeCharged'} = 1; |
2415 |
_FixOverduesOnReturn( |
|
|
2416 |
$patron_unblessed->{borrowernumber}, |
2417 |
$item->itemnumber, undef, 'RETURNED' |
2418 |
); |
2419 |
$messages->{'LostItemFeeCharged'} = 1; |
2420 |
} |
2416 |
} |
2421 |
} |
2417 |
} |
2422 |
} |
2418 |
} |
2423 |
} |