From 52626fd98269668f711ce3df6a59b057c89e6a62 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 --- C4/Circulation.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index fe1991f2d1..668f360e4e 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2078,6 +2078,7 @@ sub AddReturn { my $itemnumber = $item->itemnumber; my $itemtype = $item->effective_itemtype; + my $localuse_count = $item->localuse; my $issue = $item->checkout; if ( $issue ) { @@ -2093,6 +2094,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.30.2