@@ -, +, @@ --- C4/Circulation.pm | 10 ++++++++-- circ/returns.pl | 3 +++ .../en/modules/admin/preferences/circulation.pref | 6 ++++++ .../intranet-tmpl/prog/en/modules/circ/returns.tt | 3 +++ 4 files changed, 20 insertions(+), 2 deletions(-) --- a/C4/Circulation.pm +++ a/C4/Circulation.pm @@ -1515,7 +1515,8 @@ sub AddReturn { my $biblio; my $doreturn = 1; my $validTransfert = 0; - + my $stat_type = 'return'; + # get information on item my $itemnumber = GetItemnumberFromBarcode( $barcode ); unless ($itemnumber) { @@ -1532,6 +1533,11 @@ sub AddReturn { # even though item is not on loan, it may still be transferred; therefore, get current branch info $doreturn = 0; # 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")) { + $messages->{'LocalUse'} = 1; + $stat_type = 'localuse'; + } } my $item = GetItem($itemnumber) or die "GetItem($itemnumber) failed"; @@ -1639,7 +1645,7 @@ sub AddReturn { # update stats? # Record the fact that this book was returned. UpdateStats( - $branch, 'return', '0', '', + $branch, $stat_type, '0', '', $item->{'itemnumber'}, $biblio->{'itemtype'}, $borrowernumber --- a/circ/returns.pl +++ a/circ/returns.pl @@ -423,6 +423,9 @@ foreach my $code ( keys %$messages ) { $err{notissued} = 1; $err{msg} = $branches->{ $messages->{'IsPermanent'} }->{'branchname'}; } + elsif ( $code eq 'LocalUse' ) { + $err{localuse} = 1; + } elsif ( $code eq 'WasLost' ) { $err{waslost} = 1; } --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -84,6 +84,12 @@ Circulation: yes: Show no: "Don't show" - a button to clear the current patron from the screen on the circulation screen. + - + - pref: RecordLocalUseOnReturn + choices: + yes: Record + no: "Don't record" + - local use when an unissued item is checked in. Checkout Policy: - - pref: AllowNotForLoanOverride --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -298,6 +298,9 @@ function Dopop(link) { [% IF ( errmsgloo.notissued ) %]

Not checked out.

[% END %] + [% IF ( errmsgloo.localuse) %] +

Local Use recorded

+ [% END %] [% IF ( errmsgloo.waslost ) %]

Item was lost, now found.

[% END %] --