Bug 29221: Correctly display refund info
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 19 Oct 2021 09:39:48 +0000 (11:39 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 21 Oct 2021 08:04:34 +0000 (10:04 +0200)
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 <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Circulation.pm

index a43c104..d8a1cf1 100644 (file)
@@ -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(