Bug 18501: Adjust condition for flagging an item found
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 14 Aug 2020 08:51:39 +0000 (10:51 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 20 Aug 2020 10:31:59 +0000 (12:31 +0200)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Koha/Item.pm

index 74f09ab..f2ca45d 100644 (file)
@@ -172,7 +172,9 @@ sub store {
         # If item was lost, it has now been found, reverse any list item charges if necessary.
         if ( exists $updated_columns{itemlost}
                 and $self->itemlost != $updated_columns{itemlost}
-                and $updated_columns{itemlost} >= 1 ) {
+                and $self->itemlost >= 1
+                and $updated_columns{itemlost} <= 0
+        ) {
             $self->_set_found_trigger;
             $self->paidfor('');
         }