From ad1182411220d74cd13ea5cd1525b71cf7fef981 Mon Sep 17 00:00:00 2001 From: Alex Sassmannshausen Date: Thu, 10 Aug 2017 13:33:36 +0200 Subject: [PATCH] Bug 19074: Fix category display in Batch patron modification. * tools/modborrowers.pl (GetBorrowerInfos): Fix setting of patron category description. * koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt: Use it. Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart Signed-off-by: Jonathan Druart --- koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt | 2 +- tools/modborrowers.pl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt index 0ff04f5b27..74705639a5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt @@ -282,7 +282,7 @@ [% borrower.surname %] [% borrower.firstname %] [% Branches.GetName( borrower.branchcode ) %] - [% borrower.categorycode %] + [% borrower.category_description %] [% borrower.city %] [% borrower.state %] [% borrower.zipcode %] diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl index 720e2a107e..7acc9a8a33 100755 --- a/tools/modborrowers.pl +++ b/tools/modborrowers.pl @@ -367,6 +367,7 @@ exit; sub GetBorrowerInfos { my ( %info ) = @_; my $borrower = Koha::Patrons->find( \%info ); + my $catdesc = $borrower->category->description; if ( $borrower ) { $borrower = $borrower->unblessed; for ( qw(dateenrolled dateexpiry) ) { @@ -377,7 +378,7 @@ sub GetBorrowerInfos { } $borrower->{$_} = $userdate || ''; } - $borrower->{category_description} = Koha::Patron::Categories->find( $borrower->{categorycode} )->{description}; + $borrower->{category_description} = $catdesc; my $attr_loop = C4::Members::Attributes::GetBorrowerAttributes( $borrower->{borrowernumber} ); $borrower->{patron_attributes} = $attr_loop; } -- 2.39.5