Lines 2544-2551
sub AddReturn {
Link Here
|
2544 |
|
2544 |
|
2545 |
if ( $claims->count ) { |
2545 |
if ( $claims->count ) { |
2546 |
$messages->{ReturnClaims} = $claims; |
2546 |
$messages->{ReturnClaims} = $claims; |
|
|
2547 |
|
2548 |
my $claim = Koha::Checkouts::ReturnClaims->find( |
2549 |
{ |
2550 |
itemnumber => $item->id, |
2551 |
resolution => undef, |
2552 |
} |
2553 |
); |
2554 |
if ($claim) { |
2555 |
my $autoClaimReturnCheckin = C4::Context->preference('AutoClaimReturnStatusOnCheckin'); |
2556 |
if ($autoClaimReturnCheckin) { |
2557 |
|
2558 |
my $patron_id = $patron->borrowernumber; |
2559 |
my $resolution = $autoClaimReturnCheckin; |
2560 |
|
2561 |
$claim->resolve( |
2562 |
{ |
2563 |
resolution => $resolution, |
2564 |
resolved_by => $patron_id, |
2565 |
} |
2566 |
); |
2567 |
$messages->{ClaimAutoResolved} = $claim; |
2568 |
} else { |
2569 |
$messages->{ReturnClaims} = $claim; |
2570 |
|
2571 |
} |
2547 |
} |
2572 |
} |
2548 |
} |
2573 |
} |
|
|
2574 |
} |
2549 |
|
2575 |
|
2550 |
# Check for bundle status |
2576 |
# Check for bundle status |
2551 |
if ( $item->in_bundle ) { |
2577 |
if ( $item->in_bundle ) { |
2552 |
- |
|
|