@@ -, +, @@ --- Koha/Template/Plugin/Borrowers.pm | 10 ---- .../prog/en/includes/members-toolbar.inc | 4 +- members/boraccount.pl | 1 + members/deletemem.pl | 41 ++++++++------- members/files.pl | 5 ++- members/mancredit.pl | 20 ++++--- members/maninvoice.pl | 18 ++++--- members/member-flags.pl | 55 ++++++++++--------- members/member-password.pl | 58 ++++++++++---------- members/moremember.pl | 1 + members/notices.pl | 17 +++--- members/pay.pl | 7 ++- members/paycollect.pl | 13 +++-- members/readingrec.pl | 21 ++++---- members/routing-lists.pl | 17 +++--- members/statistics.pl | 15 +++--- 16 files changed, 157 insertions(+), 146 deletions(-) --- a/Koha/Template/Plugin/Borrowers.pm +++ a/Koha/Template/Plugin/Borrowers.pm @@ -23,7 +23,6 @@ use Modern::Perl; use base qw( Template::Plugin ); use Koha::Borrower::Debarments qw(); -use C4::Members qw(HasOverdues); =pod @@ -49,13 +48,4 @@ sub IsDebarred { return Koha::Borrower::Debarments::IsDebarred($borrower->{borrowernumber}); } -sub HasOverdues { - my ( $self, $borrowernumber ) = @_; - - return unless $borrowernumber; - - return C4::Members::HasOverdues($borrowernumber); -} - - 1; --- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc @@ -159,8 +159,8 @@ function searchToHold(){
--- a/members/boraccount.pl +++ a/members/boraccount.pl @@ -120,6 +120,7 @@ $template->param( accounts => $accts, activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''), RoutingSerials => C4::Context->preference('RoutingSerials'), + has_overdues => HasOverdues($borrowernumber), ); output_html_with_http_headers $input, $cookie, $template->output; --- a/members/deletemem.pl +++ a/members/deletemem.pl @@ -111,26 +111,29 @@ if ($countissues > 0 or $flags->{'CHARGES'} or $data->{'borrowernumber'} or $de my ($picture, $dberror) = GetPatronImage($bor->{'borrowernumber'}); $template->param( picture => 1 ) if $picture; - $template->param(borrowernumber => $member, - surname => $bor->{'surname'}, - title => $bor->{'title'}, - cardnumber => $bor->{'cardnumber'}, - firstname => $bor->{'firstname'}, - categorycode => $bor->{'categorycode'}, - category_type => $bor->{'category_type'}, - categoryname => $bor->{'description'}, - address => $bor->{'address'}, - address2 => $bor->{'address2'}, - city => $bor->{'city'}, - zipcode => $bor->{'zipcode'}, - country => $bor->{'country'}, - phone => $bor->{'phone'}, - email => $bor->{'email'}, - branchcode => $bor->{'branchcode'}, - branchname => GetBranchName($bor->{'branchcode'}), - activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''), - RoutingSerials => C4::Context->preference('RoutingSerials'), + $template->param( + has_overdues => HasOverdues($borrowernumber), + borrowernumber => $member, + surname => $bor->{'surname'}, + title => $bor->{'title'}, + cardnumber => $bor->{'cardnumber'}, + firstname => $bor->{'firstname'}, + categorycode => $bor->{'categorycode'}, + category_type => $bor->{'category_type'}, + categoryname => $bor->{'description'}, + address => $bor->{'address'}, + address2 => $bor->{'address2'}, + city => $bor->{'city'}, + zipcode => $bor->{'zipcode'}, + country => $bor->{'country'}, + phone => $bor->{'phone'}, + email => $bor->{'email'}, + branchcode => $bor->{'branchcode'}, + branchname => GetBranchName( $bor->{'branchcode'} ), + activeBorrowerRelationship => ( C4::Context->preference('borrowerRelationship') ne '' ), + RoutingSerials => C4::Context->preference('RoutingSerials'), ); + if ($countissues >0) { $template->param(ItemsOnIssues => $countissues); } --- a/members/files.pl +++ a/members/files.pl @@ -44,7 +44,10 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( debug => 1, } ); -$template->param( 'borrower_files' => 1 ); +$template->param( + 'borrower_files' => 1, + has_overdues => HasOverdues($borrowernumber), +); my $borrowernumber = $cgi->param('borrowernumber'); my $bf = Koha::Borrower::Files->new( borrowernumber => $borrowernumber ); --- a/members/mancredit.pl +++ a/members/mancredit.pl @@ -95,14 +95,16 @@ if ($add){ $template->param(%$data); $template->param( - finesview => 1, - borrowernumber => $borrowernumber, - categoryname => $data->{'description'}, - roadtype => $roadtype, - branchname => GetBranchName($data->{'branchcode'}), - is_child => ($data->{'category_type'} eq 'C'), - activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''), - RoutingSerials => C4::Context->preference('RoutingSerials'), - ); + finesview => 1, + borrowernumber => $borrowernumber, + categoryname => $data->{'description'}, + roadtype => $roadtype, + branchname => GetBranchName( $data->{'branchcode'} ), + is_child => ( $data->{'category_type'} eq 'C' ), + activeBorrowerRelationship => ( C4::Context->preference('borrowerRelationship') ne '' ), + RoutingSerials => C4::Context->preference('RoutingSerials'), + has_overdues => HasOverdues($borrowernumber), + ); + output_html_with_http_headers $input, $cookie, $template->output; } --- a/members/maninvoice.pl +++ a/members/maninvoice.pl @@ -120,14 +120,16 @@ if ($add){ my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $data->{streettype} ); $template->param(%$data); $template->param( - finesview => 1, - borrowernumber => $borrowernumber, - categoryname => $data->{'description'}, - branchname => GetBranchName($data->{'branchcode'}), - roadtype => $roadtype, - is_child => ($data->{'category_type'} eq 'C'), - activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''), - RoutingSerials => C4::Context->preference('RoutingSerials'), + finesview => 1, + borrowernumber => $borrowernumber, + categoryname => $data->{'description'}, + branchname => GetBranchName( $data->{'branchcode'} ), + roadtype => $roadtype, + is_child => ( $data->{'category_type'} eq 'C' ), + activeBorrowerRelationship => ( C4::Context->preference('borrowerRelationship') ne '' ), + RoutingSerials => C4::Context->preference('RoutingSerials'), + has_overdues => HasOverdues($borrowernumber), ); + output_html_with_http_headers $input, $cookie, $template->output; } --- a/members/member-flags.pl +++ a/members/member-flags.pl @@ -175,33 +175,34 @@ if (C4::Context->preference('ExtendedPatronAttributes')) { my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $bor->{streettype} ); my $address = $bor->{'streetnumber'} . " $roadtype " . $bor->{'address'}; -$template->param( - borrowernumber => $bor->{'borrowernumber'}, - cardnumber => $bor->{'cardnumber'}, - surname => $bor->{'surname'}, - firstname => $bor->{'firstname'}, - othernames => $bor->{'othernames'}, - categorycode => $bor->{'categorycode'}, - category_type => $bor->{'category_type'}, - categoryname => $bor->{'description'}, - address => $address, - address2 => $bor->{'address2'}, - city => $bor->{'city'}, - state => $bor->{'state'}, - zipcode => $bor->{'zipcode'}, - country => $bor->{'country'}, - phone => $bor->{'phone'}, - phonepro => $bor->{'phonepro'}, - mobile => $bor->{'mobile'}, - email => $bor->{'email'}, - emailpro => $bor->{'emailpro'}, - branchcode => $bor->{'branchcode'}, - branchname => GetBranchName($bor->{'branchcode'}), - loop => \@loop, - is_child => ($bor->{'category_type'} eq 'C'), - activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''), - RoutingSerials => C4::Context->preference('RoutingSerials'), - ); + $template->param( + has_overdues => HasOverdues($borrowernumber), + borrowernumber => $bor->{'borrowernumber'}, + cardnumber => $bor->{'cardnumber'}, + surname => $bor->{'surname'}, + firstname => $bor->{'firstname'}, + othernames => $bor->{'othernames'}, + categorycode => $bor->{'categorycode'}, + category_type => $bor->{'category_type'}, + categoryname => $bor->{'description'}, + address => $address, + address2 => $bor->{'address2'}, + city => $bor->{'city'}, + state => $bor->{'state'}, + zipcode => $bor->{'zipcode'}, + country => $bor->{'country'}, + phone => $bor->{'phone'}, + phonepro => $bor->{'phonepro'}, + mobile => $bor->{'mobile'}, + email => $bor->{'email'}, + emailpro => $bor->{'emailpro'}, + branchcode => $bor->{'branchcode'}, + branchname => GetBranchName( $bor->{'branchcode'} ), + loop => \@loop, + is_child => ( $bor->{'category_type'} eq 'C' ), + activeBorrowerRelationship => ( C4::Context->preference('borrowerRelationship') ne '' ), + RoutingSerials => C4::Context->preference('RoutingSerials'), + ); output_html_with_http_headers $input, $cookie, $template->output; --- a/members/member-password.pl +++ a/members/member-password.pl @@ -104,34 +104,36 @@ if (C4::Context->preference('ExtendedPatronAttributes')) { my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $bor->{streettype} ); my $address = $bor->{'streetnumber'} . " $roadtype " . $bor->{'address'}; - $template->param( othernames => $bor->{'othernames'}, - surname => $bor->{'surname'}, - firstname => $bor->{'firstname'}, - borrowernumber => $bor->{'borrowernumber'}, - cardnumber => $bor->{'cardnumber'}, - categorycode => $bor->{'categorycode'}, - category_type => $bor->{'category_type'}, - categoryname => $bor->{'description'}, - address => $address, - address2 => $bor->{'address2'}, - city => $bor->{'city'}, - state => $bor->{'state'}, - zipcode => $bor->{'zipcode'}, - country => $bor->{'country'}, - phone => $bor->{'phone'}, - phonepro => $bor->{'phonepro'}, - mobile => $bor->{'mobile'}, - email => $bor->{'email'}, - emailpro => $bor->{'emailpro'}, - branchcode => $bor->{'branchcode'}, - branchname => GetBranchName($bor->{'branchcode'}), - userid => $bor->{'userid'}, - destination => $destination, - is_child => ($bor->{'category_type'} eq 'C'), - activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''), - minPasswordLength => $minpw, - RoutingSerials => C4::Context->preference('RoutingSerials'), - ); + $template->param( + othernames => $bor->{'othernames'}, + has_overdues => HasOverdues($borrowernumber), + surname => $bor->{'surname'}, + firstname => $bor->{'firstname'}, + borrowernumber => $bor->{'borrowernumber'}, + cardnumber => $bor->{'cardnumber'}, + categorycode => $bor->{'categorycode'}, + category_type => $bor->{'category_type'}, + categoryname => $bor->{'description'}, + address => $address, + address2 => $bor->{'address2'}, + city => $bor->{'city'}, + state => $bor->{'state'}, + zipcode => $bor->{'zipcode'}, + country => $bor->{'country'}, + phone => $bor->{'phone'}, + phonepro => $bor->{'phonepro'}, + mobile => $bor->{'mobile'}, + email => $bor->{'email'}, + emailpro => $bor->{'emailpro'}, + branchcode => $bor->{'branchcode'}, + branchname => GetBranchName( $bor->{'branchcode'} ), + userid => $bor->{'userid'}, + destination => $destination, + is_child => ( $bor->{'category_type'} eq 'C' ), + activeBorrowerRelationship => ( C4::Context->preference('borrowerRelationship') ne '' ), + minPasswordLength => $minpw, + RoutingSerials => C4::Context->preference('RoutingSerials'), + ); if( scalar(@errors )){ $template->param( errormsg => 1 ); --- a/members/moremember.pl +++ a/members/moremember.pl @@ -341,6 +341,7 @@ if (C4::Context->preference('EnhancedMessagingPreferences')) { # in template