From 5b863364fa81de2523928365657dfe90e60dba7c 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 --- C4/Circulation.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 6bba369114..b8d9901d37 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2097,6 +2097,7 @@ sub AddReturn { my $itemnumber = $item->itemnumber; my $itemtype = $item->effective_itemtype; + my $localuse_count = $item->localuse; my $issue = $item->checkout; if ( $issue ) { @@ -2112,6 +2113,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