From da14d2e31b79dc758da5644522bc72b76d986385 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. --- C4/Circulation.pm | 5 ++++- .../prog/en/modules/circ/circulation.tt | 5 +++++ 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 9c43f36..6ca860d 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -36,7 +36,7 @@ use C4::Message; use C4::Debug; use C4::Branch; # GetBranches use C4::Log; # logaction - +use C4::Koha qw(GetAuthorisedValueByCode); use Data::Dumper; use Koha::DateUtils; use Koha::Calendar; @@ -848,6 +848,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 57c16ee..fbe3b02 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 %]
    -- 1.7.2.5