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

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

Return to bug 27753