Bug 17600: Standardize our EXPORT_OK
[srvgit] / C4 / SIP / ILS / Transaction / RenewAll.pm
index c7be96b..5acd53e 100644 (file)
@@ -1,18 +1,18 @@
 #
 # RenewAll: class to manage status of "Renew All" transaction
 
-package ILS::Transaction::RenewAll;
+package C4::SIP::ILS::Transaction::RenewAll;
 
 use strict;
 use warnings;
 
-use Sys::Syslog qw(syslog);
+use C4::SIP::Sip qw( siplog );
 
-use ILS::Item;
+use C4::SIP::ILS::Item;
 
-use C4::Members qw( GetMember );
+use Koha::Patrons;
 
-use base qw(ILS::Transaction::Renew);
+use parent qw(C4::SIP::ILS::Transaction::Renew);
 
 my %fields = (
     renewed   => [],
@@ -34,15 +34,15 @@ sub new {
 sub do_renew_all {
     my $self     = shift;
     my $patron   = $self->{patron};                           # SIP's  patron
-    my $borrower = GetMember( cardnumber => $patron->id );    # Koha's patron
+    my $borrower = Koha::Patrons->find( { cardnumber => $patron->id } )->unblessed;    # Koha's patron
     my $all_ok   = 1;
     $self->{renewed}   = [];
     $self->{unrenewed} = [];
     foreach my $itemx ( @{ $patron->{items} } ) {
         my $item_id = $itemx->{barcode};
-        my $item    = ILS::Item->new($item_id);
+        my $item    = C4::SIP::ILS::Item->new($item_id);
         if ( !defined($item) ) {
-            syslog(
+            siplog(
                 'LOG_WARNING',
                 q|renew_all: Invalid item id '%s' associated with patron '%s'|,
                 $item_id,