From 4aaf383e527ff4b165696e8dd982daf82abb6ff2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 19 Oct 2021 11:39:48 +0200 Subject: [PATCH] Bug 29221: Correctly display refund info 2132 $messages->{'LostItemFeeRefunded'} = $updated_item->{_refunded}; But, in returns.pl: 495 elsif ( $code eq 'LostItemFeeRefunded' ) { 496 $template->param( LostItemFeeRefunded => 1 ); 497 } 1. Set BlockReturnOfLostItems to 'don't block' 2. Make sure your 'Default lost item fee refund on return policy' circ rule is set to 'Leave lost item charge' 3. Check something out and then mark it as lost. 4. Check the item in => No message to tell there was a refund Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- C4/Circulation.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index a43c104d53..d8a1cf1a65 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2129,8 +2129,8 @@ sub AddReturn { if ($item_was_lost) { $messages->{'WasLost'} = 1; unless ( C4::Context->preference("BlockReturnOfLostItems") ) { - $messages->{'LostItemFeeRefunded'} = $updated_item->{_refunded}; - $messages->{'LostItemFeeRestored'} = $updated_item->{_restored}; + $messages->{'LostItemFeeRefunded'} = 1 if $updated_item->{_refunded}; + $messages->{'LostItemFeeRestored'} = 1 if $updated_item->{_restored}; if ( $updated_item->{_charge} ) { $issue //= Koha::Old::Checkouts->search( -- 2.39.5