Lines 47-52
use Storable qw( freeze thaw );
Link Here
|
47 |
use URI::Escape qw( uri_escape_utf8 ); |
47 |
use URI::Escape qw( uri_escape_utf8 ); |
48 |
use C4::Members; |
48 |
use C4::Members; |
49 |
use Koha::UI::Form::Builder::Item; |
49 |
use Koha::UI::Form::Builder::Item; |
|
|
50 |
use Koha::Result::Boolean; |
50 |
|
51 |
|
51 |
use MARC::File::XML; |
52 |
use MARC::File::XML; |
52 |
use URI::Escape qw( uri_escape_utf8 ); |
53 |
use URI::Escape qw( uri_escape_utf8 ); |
Lines 412-418
if ($op eq "additem") {
Link Here
|
412 |
#------------------------------------------------------------------------------- |
413 |
#------------------------------------------------------------------------------- |
413 |
# check that there is no issue on this item before deletion. |
414 |
# check that there is no issue on this item before deletion. |
414 |
my $item = Koha::Items->find($itemnumber); |
415 |
my $item = Koha::Items->find($itemnumber); |
415 |
my $deleted = $item->safe_delete; |
416 |
my $deleted; |
|
|
417 |
if( $item ) { |
418 |
$deleted = $item->safe_delete; |
419 |
} else { |
420 |
$deleted = Koha::Result::Boolean->new(0)->add_message({ message => 'item_not_found' }); |
421 |
} |
416 |
if ( $deleted ) { |
422 |
if ( $deleted ) { |
417 |
print $input->redirect("additem.pl?biblionumber=$biblionumber&frameworkcode=$frameworkcode&searchid=$searchid"); |
423 |
print $input->redirect("additem.pl?biblionumber=$biblionumber&frameworkcode=$frameworkcode&searchid=$searchid"); |
418 |
exit; |
424 |
exit; |