@@ -, +, @@ --- C4/Circulation.pm | 3 +++ circ/circulation.pl | 5 +++++ 2 files changed, 8 insertions(+) --- a/C4/Circulation.pm +++ a/C4/Circulation.pm @@ -2152,6 +2152,7 @@ sub AddReturn { my $itemnumber = $item->itemnumber; my $itemtype = $item->effective_itemtype; + my $localuse_count = $item->localuse || 0; my $issue = $item->checkout; if ( $issue ) { @@ -2167,6 +2168,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'; } --- a/circ/circulation.pl +++ a/circ/circulation.pl @@ -369,6 +369,11 @@ if (@$barcodes && $op eq 'cud-checkout') { BORROWER => $stats_borrower, ); } + + #increment items.localuse + my $localuse_count = $item->localuse; + $localuse_count++; + $item->localuse( $localuse_count )->store; } # Fix for bug 7494: optional checkout-time fallback search for a book --