bug: chargelostitem() didn't unset onloan on the item record.
authorMichael Hafen <mdhafen@tech.washk12.org>
Tue, 2 Sep 2008 19:57:09 +0000 (13:57 -0600)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 12 Nov 2008 13:40:19 +0000 (14:40 +0100)
I don't think this is left set intentionally.

If an item is set lost and it's on loan it's marked returned, but it
wasn't set as not on loan.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
C4/Accounts.pm

index 34dcede..c43741b 100644 (file)
@@ -313,6 +313,8 @@ sub chargelostitem{
         #FIXME : Should probably have a way to distinguish this from an item that really was returned.
         warn " $issues->{'borrowernumber'}  /  $itemnumber ";
         C4::Circulation::MarkIssueReturned($issues->{borrowernumber},$itemnumber);
+       #  Shouldn't MarkIssueReturned do this?
+        ModItem({ onloan => undef }, undef, $itemnumber);
     }
     $sth->finish;
 }