From abaa61ab610934c66e2f33637349d9ea2ede65d7 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 11 Mar 2022 16:02:47 +0000 Subject: [PATCH] Bug 30275: Record renewals Signed-off-by: Owen Leonard Signed-off-by: Tomas Cohen Arazi --- C4/Circulation.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 457f9e5b5a..be0d0a04a2 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -3217,6 +3217,16 @@ sub AddRenewal { DelUniqueDebarment({ borrowernumber => $borrowernumber, type => 'OVERDUES' }); } + # Add renewal record + my $renewal = Koha::Checkouts::Renewal->new( + { + issue_id => $issue->issue_id, + renewer_id => C4::Context->userenv->{'number'}, + seen => $seen, + interface => C4::Context->interface + } + )->store(); + # Add the renewal to stats C4::Stats::UpdateStats( { -- 2.39.5