From eb7e84efb98c24952fa2738bbe78178d5c52121a Mon Sep 17 00:00:00 2001 From: Laura Escamilla Date: Tue, 30 Apr 2024 15:51:45 +0000 Subject: [PATCH] Bug 27753: (follow-up) Tidy introduced code in Circulation.pm Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- C4/Circulation.pm | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index a83e59671c..2e24b99075 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2536,28 +2536,28 @@ sub AddReturn { if ( C4::Context->preference('ClaimReturnedLostValue') ) { - my $claim = Koha::Checkouts::ReturnClaims->find( - { - itemnumber => $item->id, - resolution => undef, - } - ); - if ($claim) { - my $autoClaimReturnCheckin = C4::Context->preference('AutoClaimReturnStatusOnCheckin'); - if ($autoClaimReturnCheckin) { + my $claim = Koha::Checkouts::ReturnClaims->find( + { + itemnumber => $item->id, + resolution => undef, + } + ); + if ($claim) { + my $autoClaimReturnCheckin = C4::Context->preference('AutoClaimReturnStatusOnCheckin'); + if ($autoClaimReturnCheckin) { - my $patron_id = $patron->borrowernumber; - my $resolution = $autoClaimReturnCheckin; + my $patron_id = $patron->borrowernumber; + my $resolution = $autoClaimReturnCheckin; - $claim->resolve( - { - resolution => $resolution, - resolved_by => $patron_id, - } - ); - $messages->{ClaimAutoResolved} = $claim; - } else { - $messages->{ReturnClaims} = $claim; + $claim->resolve( + { + resolution => $resolution, + resolved_by => $patron_id, + } + ); + $messages->{ClaimAutoResolved} = $claim; + } else { + $messages->{ReturnClaims} = $claim; } } } -- 2.39.5