From 5c2f4cc7e08f5be6bbaabc6c86e87050189472cc Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 5 Aug 2016 11:43:52 +0100 Subject: [PATCH] Bug 16960: Update 1 missing occurrence of GetModifications Signed-off-by: Bob Birchall Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall --- Koha/Patron/Modification.pm | 2 +- circ/circulation.pl | 3 ++- koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 2 +- t/db_dependent/Koha_borrower_modifications.t | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Koha/Patron/Modification.pm b/Koha/Patron/Modification.pm index 8afbd5e4ff..54071723a6 100644 --- a/Koha/Patron/Modification.pm +++ b/Koha/Patron/Modification.pm @@ -27,7 +27,7 @@ use base qw(Koha::Object); =head1 NAME -Koha::Patron::Modification - Class represents a requrest to modify or create a patron +Koha::Patron::Modification - Class represents a request to modify or create a patron =head2 Class Methods diff --git a/circ/circulation.pl b/circ/circulation.pl index 940e902c75..867466e8f0 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -659,13 +659,14 @@ $template->param( my $patron_image = Koha::Patron::Images->find($borrower->{borrowernumber}); $template->param( picture => 1 ) if $patron_image; +my $has_modifications = Koha::Patron::Modifications->search( { borrowernumber => $borrowernumber } )->count; $template->param( debt_confirmed => $debt_confirmed, SpecifyDueDate => $duedatespec_allow, CircAutocompl => C4::Context->preference("CircAutocompl"), debarments => GetDebarments({ borrowernumber => $borrowernumber }), todaysdate => output_pref( { dt => dt_from_string()->set(hour => 23)->set(minute => 59), dateformat => 'sql' } ), - modifications => Koha::Patron::Modifications->GetModifications({ borrowernumber => $borrowernumber }), + has_modifications => $has_modifications, override_high_holds => $override_high_holds, nopermission => scalar $query->param('nopermission'), ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 4d3965ca16..545d0e80c4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -706,7 +706,7 @@ No patron matched [% message | html %]
    - [% IF ( modifications ) %] + [% IF ( has_modifications ) %]
  • Pending modifications: Patron has pending modifications. [% IF CAN_user_borrowers && ( !Koha.Preference('IndependentBranchesPatronModifications') || borrower.branch == branch ) %] View all pending patron modifications diff --git a/t/db_dependent/Koha_borrower_modifications.t b/t/db_dependent/Koha_borrower_modifications.t index e09ae4b92e..fb244953cb 100755 --- a/t/db_dependent/Koha_borrower_modifications.t +++ b/t/db_dependent/Koha_borrower_modifications.t @@ -87,6 +87,6 @@ my $new_borrower = GetMember( borrowernumber => $borr1 ); ## Check to see that the approved modifications were saved ok( $new_borrower->{'surname'} eq 'Hall', - 'Test approve() applys modification to borrower' ); + 'Test approve() applies modification to borrower' ); $dbh->rollback(); -- 2.39.5