From 4e0d3cd54e1af95cd9e952a6af918c3d57c7618d Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 6 Jul 2020 09:44:11 +0100 Subject: [PATCH] Bug 21468: Add 'checkout' action for _after_circ_actions This patch adds a call to _after_circ_actions into AddIssue and passes an appropriate payload for plugins to utilise after issuing items. --- C4/Circulation.pm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index c67b3752e2..b300471d9b 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1496,6 +1496,23 @@ sub AddIssue { } } + _after_circ_actions( + { + action => 'checkout', + payload => { + type => ( $onsite_checkout ? 'onsite_checkout' : 'issue' ), + library_id => C4::Context->userenv->{'branch'}, + charge => $charge, + item_id => $item_object->itemnumber, + item_type => $item_object->effective_itemtype, + shelving_location => $item_object->location // q{}, + patron_id => $borrower->{'borrowernumber'}, + collection_code => $item_object->ccode // q{}, + date_due => $datedue + } + } + ) if C4::Context->config("enable_plugins"); + # Record the fact that this book was issued. &UpdateStats( { -- 2.20.1