Adds a confirmation alert when issuing an item that has
been marked as lost.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
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 <paul.poulain@biblibre.com>
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;
{
$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 ) ) {
[% IF ( NOT_FOR_LOAN_FORCING ) %]
<li>Item is normally not for loan. Check out anyway?</li>
[% END %]
+
[% IF ( USERBLOCKEDOVERDUE ) %]
<li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s). Check out anyway?</li>
[% END %]
+
+[% IF ( ITEM_LOST ) %]
+ <li>This item has been lost with a status of "[% ITEM_LOST %]". Check out anyway?</li>
+[% END %]
</ul>
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">