From 154a4011f7aab3ea38d5f60145b04cd9ee34ff8b Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 5 Apr 2022 09:07:01 -0400 Subject: [PATCH] Bug 17506: Offline circ needs to be logged Returns via offline circ are not logged. Test Plan: 1) Via offline circ * Return some items checked out to patrons * Check out some items that are currently checked out to other patrons 2) Apply the offline circs to Koha 3) Note the checkouts are logged, but not the returns 4) Apply this patch, restart all the things! 5) Repeat steps 1 and 2 6) Note the checkins are now logged both for returns and for checkouts where the item was checked out to a different patron --- C4/Circulation.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index c5c9701201..e7b6faacae 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -4032,6 +4032,9 @@ sub ProcessOfflineReturn { $item->renewals_count(0); $item->onloan(undef); $item->store({ log_action => 0 }); + + logaction("CIRCULATION", "RETURN", $issue->{borrowernumber}, $itemnumber) + if C4::Context->preference("ReturnLog"); return "Success."; } else { return "Item not issued."; @@ -4060,6 +4063,9 @@ sub ProcessOfflineIssue { $itemnumber, $operation->{timestamp}, ); + + logaction("CIRCULATION", "RETURN", $issue->{borrowernumber}, $itemnumber) + if C4::Context->preference("ReturnLog"); } AddIssue( $patron->unblessed, -- 2.30.2