Bug 14504: (QA followup) Fix error causing item not to be deleted
authorBarton Chittenden <barton@bywatersolutions.com>
Tue, 16 Aug 2016 20:27:16 +0000 (20:27 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 26 Aug 2016 12:07:27 +0000 (12:07 +0000)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
misc/cronjobs/delete_items.pl

index 0e9e8d1..88a6bc0 100755 (executable)
@@ -57,9 +57,9 @@ $GLOBAL->{sth}->{target_items}->execute();
 
 DELITEM: while ( my $item = $GLOBAL->{sth}->{target_items}->fetchrow_hashref() ) {
 
-    my $status = C4::Items::ItemSafeToDelete( $item->{itemnumber}, $item->{biblionumber} );
+    my $status = C4::Items::ItemSafeToDelete( $item->{biblionumber}, $item->{itemnumber} );
     if( $status eq '1' )  {
-        C4::Items::DelItemCheck( $item->{itemnumber}, $item->{biblionumber} );
+        C4::Items::DelItemCheck( $item->{biblionumber}, $item->{itemnumber} );
         verbose "Deleting '$item->{itemnumber}'";
     } else {
         verbose "Item '$item->{itemnumber}' not deletd: $status";