From 319529c686edd3b2e47e50aebf36cf2ae206e948 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 6 Jul 2020 13:46:47 +0100 Subject: [PATCH] Bug 21468: Add 'checkin' action for _after_circ_actions Signed-off-by: Tomas Cohen Arazi --- C4/Circulation.pm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 0ce4af96aa..ed01dac2f4 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2145,6 +2145,22 @@ sub AddReturn { $messages->{'ResFound'} = $resrec; } + _after_circ_actions( + { + action => 'checkin', + payload => { + library_id => C4::Context->userenv->{'branch'}, + item_id => $item->itemnumber, + item_type => $item->effective_itemtype, + shelving_location => $item->location // q{}, + patron_id => $borrowernumber, + collection_code => $item->ccode // q{}, + date_returned => $return_date, + date_due => $issue ? $issue->date_due : q{} + } + } + ) if C4::Context->config("enable_plugins"); + # Record the fact that this book was returned. UpdateStats({ branch => $branch, -- 2.27.0