From 302dc6c2520d6ed44cd5bdacae73698f39bab073 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 5 Aug 2016 11:43:52 +0100 Subject: [PATCH] [PASSED QA] Bug 16960: Update 1 missing occurrence of GetModifications Signed-off-by: Bob Birchall Signed-off-by: Katrin Fischer --- 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 8afbd5e..5407172 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 940e902..867466e 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 4d3965c..545d0e8 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 e09ae4b..fb24495 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.7.4