View | Details | Raw Unified | Return to bug 27753
Collapse All | Expand All

(-)a/C4/Circulation.pm (-15 / +14 lines)
Lines 2535-2563 sub AddReturn { Link Here
2535
    }
2535
    }
2536
2536
2537
    if ( C4::Context->preference('ClaimReturnedLostValue') ) {
2537
    if ( C4::Context->preference('ClaimReturnedLostValue') ) {
2538
        my $autoClaimReturnCheckin = C4::Context->preference('AutoClaimReturnStatusOnCheckin');
2539
2538
2540
        if ($autoClaimReturnCheckin) {
2541
            my $claim = Koha::Checkouts::ReturnClaims->find(
2539
            my $claim = Koha::Checkouts::ReturnClaims->find(
2542
                {
2540
                {
2543
                    itemnumber => $item->id,
2541
                    itemnumber => $item->id,
2544
                    resolution => undef,
2542
                    resolution => undef,
2545
                }
2543
                }
2546
            );
2544
            );
2547
2548
            if ($claim) {
2545
            if ($claim) {
2549
                my $patron_id  = $patron->borrowernumber;
2546
                my $autoClaimReturnCheckin = C4::Context->preference('AutoClaimReturnStatusOnCheckin');
2550
                my $resolution = $autoClaimReturnCheckin;
2547
                if ($autoClaimReturnCheckin) {
2551
2548
2552
                $claim->resolve(
2549
                    my $patron_id  = $patron->borrowernumber;
2553
                    {
2550
                    my $resolution = $autoClaimReturnCheckin;
2554
                        resolution  => $resolution,
2551
2555
                        resolved_by => $patron_id,
2552
                    $claim->resolve(
2556
                    }
2553
                        {
2557
                );
2554
                            resolution  => $resolution,
2558
                $messages->{ClaimAutoResolved} = $claim;
2555
                            resolved_by => $patron_id,
2559
            } else {
2556
                        }
2560
                $messages->{ReturnClaims} = $claim if $claim;
2557
                    );
2558
                    $messages->{ClaimAutoResolved} = $claim;
2559
                } else {
2560
                    $messages->{ReturnClaims} = $claim;
2561
            }
2561
            }
2562
        }
2562
        }
2563
    }
2563
    }
2564
- 

Return to bug 27753