@@ -, +, @@ --- C4/Circulation.pm | 1 + circ/returns.pl | 3 +++ .../intranet-tmpl/prog/en/modules/circ/returns.tt | 8 ++++++++ 3 files changed, 12 insertions(+), 0 deletions(-) --- a/C4/Circulation.pm +++ a/C4/Circulation.pm @@ -1766,6 +1766,7 @@ sub AddReturn { else { foreach my $key ( keys %$rules ) { if ( $item->{notforloan} eq $key ) { + $messages->{'NotForLoanStatusUpdated'} = { from => $item->{notforloan}, to => $rules->{$key} }; ModItem( { notforloan => $rules->{$key} }, undef, $itemnumber ); last; } --- a/circ/returns.pl +++ a/circ/returns.pl @@ -467,6 +467,9 @@ foreach my $code ( keys %$messages ) { $err{debarborrowernumber} = $borrower->{borrowernumber}; $err{debarname} = "$borrower->{firstname} $borrower->{surname}"; } + elsif ( $code eq 'NotForLoanStatusUpdated' ) { + $err{NotForLoanStatusUpdated} = $messages->{NotForLoanStatusUpdated}; + } else { die "Unknown error code $code"; # note we need all the (empty) elsif's above, or we die. # This forces the issue of staying in sync w/ Circulation.pm --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -1,5 +1,6 @@ [% USE KohaDates %] [% USE Branches %] +[% USE AuthorisedValues %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Check in [% title |html %] @@ -319,6 +320,13 @@ $(document).ready(function () {

Check in message

[% FOREACH errmsgloo IN errmsgloop %] + [% IF ( errmsgloo.NotForLoanStatusUpdated ) %] +

+ Not for loan status updated + from [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.from ) %] + to [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.to ) %] +

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

No item with barcode: [% errmsgloo.msg %]

[% END %] --