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'),
);
<ul>
- [% IF ( modifications ) %]
+ [% IF ( has_modifications ) %]
<li><span class="circ-hlt">Pending modifications:</span> Patron has pending modifications.
[% IF CAN_user_borrowers && ( !Koha.Preference('IndependentBranchesPatronModifications') || borrower.branch == branch ) %]
<a href="/cgi-bin/koha/members/members-update.pl">View all pending patron modifications</a>
## 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();