Lines 78-84
sub get_item_from_cookie {
Link Here
|
78 |
} |
78 |
} |
79 |
|
79 |
|
80 |
my $input = CGI->new; |
80 |
my $input = CGI->new; |
81 |
my $error = $input->param('error'); |
|
|
82 |
|
81 |
|
83 |
my $biblionumber; |
82 |
my $biblionumber; |
84 |
my $itemnumber; |
83 |
my $itemnumber; |
Lines 377-383
if ($op eq "additem") {
Link Here
|
377 |
#------------------------------------------------------------------------------- |
376 |
#------------------------------------------------------------------------------- |
378 |
# check that there is no issue on this item before deletion. |
377 |
# check that there is no issue on this item before deletion. |
379 |
my $item = Koha::Items->find($itemnumber); |
378 |
my $item = Koha::Items->find($itemnumber); |
380 |
$error = $item->safe_delete; |
379 |
my $error = $item->safe_delete; |
381 |
if(ref($error) eq 'Koha::Item'){ |
380 |
if(ref($error) eq 'Koha::Item'){ |
382 |
print $input->redirect("additem.pl?biblionumber=$biblionumber&frameworkcode=$frameworkcode&searchid=$searchid"); |
381 |
print $input->redirect("additem.pl?biblionumber=$biblionumber&frameworkcode=$frameworkcode&searchid=$searchid"); |
383 |
}else{ |
382 |
}else{ |
Lines 389-395
if ($op eq "additem") {
Link Here
|
389 |
#------------------------------------------------------------------------------- |
388 |
#------------------------------------------------------------------------------- |
390 |
my $items = Koha::Items->search({ biblionumber => $biblionumber }); |
389 |
my $items = Koha::Items->search({ biblionumber => $biblionumber }); |
391 |
while ( my $item = $items->next ) { |
390 |
while ( my $item = $items->next ) { |
392 |
$error = $item->safe_delete({ skip_record_index => 1 }); |
391 |
my $error = $item->safe_delete({ skip_record_index => 1 }); |
393 |
next if ref $error eq 'Koha::Item'; # Deleted item is returned if deletion successful |
392 |
next if ref $error eq 'Koha::Item'; # Deleted item is returned if deletion successful |
394 |
push @errors,$error; |
393 |
push @errors,$error; |
395 |
} |
394 |
} |
396 |
- |
|
|