From 8ba7559cedea96872a84ca42aa2f000854b25466 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 7 Apr 2023 16:57:12 +0000 Subject: [PATCH] Bug 16122: Increment items.localuse in AddReturn Signed-off-by: Christopher Brannon Signed-off-by: Emily Lamancusa --- C4/Circulation.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 0f1b6914aa..52304857ce 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2100,6 +2100,7 @@ sub AddReturn { my $itemnumber = $item->itemnumber; my $itemtype = $item->effective_itemtype; + my $localuse_count = $item->localuse; my $issue = $item->checkout; if ( $issue ) { @@ -2115,6 +2116,8 @@ sub AddReturn { # No issue, no borrowernumber. ONLY if $doreturn, *might* you have a $borrower later. # Record this as a local use, instead of a return, if the RecordLocalUseOnReturn is on if (C4::Context->preference("RecordLocalUseOnReturn")) { + $localuse_count++; + $item->localuse( $localuse_count )->store; $messages->{'LocalUse'} = 1; $stat_type = 'localuse'; } -- 2.34.1