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 <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
b8b0b1370f
commit
2e74c8f15b
|
|
@ -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} = '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue