Bug 17196: Fix delete_records_via_leader.pl
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 29 Dec 2016 02:16:21 +0000 (02:16 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 13 Jan 2017 13:49:28 +0000 (13:49 +0000)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
misc/cronjobs/delete_records_via_leader.pl

index 0b19d38..baba5dc 100755 (executable)
@@ -36,6 +36,7 @@ use Getopt::Long;
 use C4::Biblio;
 use C4::Items;
 use Koha::Database;
+use Koha::Biblioitems;
 use Koha::Biblio::Metadatas;
 
 my $delete_items;
@@ -85,7 +86,7 @@ foreach my $m (@metadatas) {
 
     if ($delete_items) {
         my $deleted_count = 0;
-        my $biblioitem = Koha::Biblioitem->find( $biblionumber );
+        my $biblioitem = Koha::Biblioitems->find( $biblionumber );
         foreach my $item ( $biblioitem->items() ) {
             my $itemnumber = $item->itemnumber();