Lines 39-44
use C4::Items;
Link Here
|
39 |
use Koha::Database; |
39 |
use Koha::Database; |
40 |
use Koha::Biblios; |
40 |
use Koha::Biblios; |
41 |
use Koha::Biblio::Metadatas; |
41 |
use Koha::Biblio::Metadatas; |
|
|
42 |
use Koha::Items; |
42 |
|
43 |
|
43 |
my $delete_items; |
44 |
my $delete_items; |
44 |
my $confirm; |
45 |
my $confirm; |
Lines 86-92
my $total_records_count = @metadatas;
Link Here
|
86 |
my $deleted_records_count = 0; |
87 |
my $deleted_records_count = 0; |
87 |
my $total_items_count = 0; |
88 |
my $total_items_count = 0; |
88 |
my $deleted_items_count = 0; |
89 |
my $deleted_items_count = 0; |
89 |
|
|
|
90 |
foreach my $m (@metadatas) { |
90 |
foreach my $m (@metadatas) { |
91 |
my $biblionumber = $m->get_column('biblionumber'); |
91 |
my $biblionumber = $m->get_column('biblionumber'); |
92 |
|
92 |
|
Lines 95-104
foreach my $m (@metadatas) {
Link Here
|
95 |
if ($delete_items) { |
95 |
if ($delete_items) { |
96 |
my $deleted_count = 0; |
96 |
my $deleted_count = 0; |
97 |
my $biblio = Koha::Biblios->find( $biblionumber ); |
97 |
my $biblio = Koha::Biblios->find( $biblionumber ); |
98 |
my @items = $biblio ? $biblio->items : (); |
98 |
my @items = Koha::Items->search( { biblionumber => $biblionumber } ); |
99 |
foreach my $item ( @items ) { |
99 |
foreach my $item ( @items ) { |
100 |
my $itemnumber = $item->itemnumber(); |
100 |
my $itemnumber = $item->itemnumber; |
101 |
|
|
|
102 |
my $error = $test ? "Test mode enabled" : DelItemCheck( $biblionumber, $itemnumber ); |
101 |
my $error = $test ? "Test mode enabled" : DelItemCheck( $biblionumber, $itemnumber ); |
103 |
$error = undef if $error eq '1'; |
102 |
$error = undef if $error eq '1'; |
104 |
|
103 |
|
105 |
- |
|
|