Bug 12598: Fix conflict with bug 16911
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 6 Jul 2017 15:49:01 +0000 (12:49 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 16 Feb 2018 16:57:58 +0000 (13:57 -0300)
Tests will have to be written for this change

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Patrons/Import.pm

index 9155c36..10173bb 100644 (file)
@@ -158,7 +158,7 @@ sub import_patrons {
 
         # Default date enrolled and date expiry if not already set.
         $borrower{dateenrolled} = $self->today_iso() unless $borrower{dateenrolled};
-        $borrower{dateexpiry} = GetExpiryDate( $borrower{categorycode}, $borrower{dateenrolled} ) unless $borrower{dateexpiry};
+        $borrower{dateexpiry} = Koha::Patron::Categories->find( $borrower{categorycode} )->get_expiry_date( $borrower{dateenrolled} ) unless $borrower{dateexpiry};
 
         my $borrowernumber;
         my $member;