From 2e74c8f15b7db2d973d9dcd4c2f6ea4ed12ce709 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 11 Nov 2015 12:03:51 +0000 Subject: [PATCH] Bug 14985: Fix regression on patron search This patch fixes 2 major errors introduced by last patch: 1/ Undefined subroutine &C4::Utils::DataTables::Members::dt_from_string called when searching for patrons 2/ Display the dates on the patron search in the pref format, not iso Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- C4/Utils/DataTables/Members.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Utils/DataTables/Members.pm b/C4/Utils/DataTables/Members.pm index 5e0b8128c4..bfa73e01e1 100644 --- a/C4/Utils/DataTables/Members.pm +++ b/C4/Utils/DataTables/Members.pm @@ -1,10 +1,11 @@ package C4::Utils::DataTables::Members; +use Modern::Perl; use C4::Branch qw/onlymine/; use C4::Context; use C4::Members qw/GetMemberIssuesAndFines/; use C4::Utils::DataTables; -use Modern::Perl; +use Koha::DateUtils; sub search { my ( $params ) = @_; @@ -142,7 +143,7 @@ sub search { ($patron->{overdues}, $patron->{issues}, $patron->{fines}) = GetMemberIssuesAndFines($patron->{borrowernumber}); if($patron->{dateexpiry} and $patron->{dateexpiry} ne '0000-00-00') { - $patron->{dateexpiry} = output_pref( { dt => dt_from_string( $patron->{dateexpiry}), dateonly => 1, dateformat => 'iso' } ); + $patron->{dateexpiry} = output_pref( { dt => dt_from_string( $patron->{dateexpiry}, 'iso'), dateonly => 1} ); } else { $patron->{dateexpiry} = ''; } -- 2.39.5