From 6e2500fcb131e6c7f5a353ad7e209731a5281a51 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 5 Apr 2012 11:16:47 -0400 Subject: [PATCH] Bug 7758 - Koha allowing LOST items to check out without alert Adds a confirmation alert when issuing an item that has been marked as lost. Signed-off-by: Liz Rea passes tests, works as advertiesd Tested: - checking out an item that is marked lost performs all usual lost operations - checking out an item that is marked lost prompts for confirmation Signed-off-by: Paul Poulain Signed-off-by: Jared Camins-Esakov --- C4/Circulation.pm | 5 ++++- koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index feb71b6fcc..838c845c87 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -46,7 +46,7 @@ use Date::Calc qw( use POSIX qw(strftime); use C4::Branch; # GetBranches use C4::Log; # logaction - +use C4::Koha qw(GetAuthorisedValueByCode); use Data::Dumper; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); @@ -826,6 +826,9 @@ sub CanBookBeIssued { { $issuingimpossible{RESTRICTED} = 1; } + if ( $item->{'itemlost'} ) { + $needsconfirmation{ITEM_LOST} = GetAuthorisedValueByCode( 'LOST', $item->{'itemlost'} ); + } if ( C4::Context->preference("IndependantBranches") ) { my $userenv = C4::Context->userenv; if ( ($userenv) && ( $userenv->{flags} % 2 != 1 ) ) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 64101d61d2..ab20670c09 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -275,9 +275,14 @@ function refocus(calendar) { [% IF ( NOT_FOR_LOAN_FORCING ) %]
  • Item is normally not for loan. Check out anyway?
  • [% END %] + [% IF ( USERBLOCKEDOVERDUE ) %]
  • Patron has [% USERBLOCKEDOVERDUE %] overdue item(s). Check out anyway?
  • [% END %] + +[% IF ( ITEM_LOST ) %] +
  • This item has been lost with a status of "[% ITEM_LOST %]". Check out anyway?
  • +[% END %]
    -- 2.39.5