@@ -, +, @@ --- koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt | 9 ++------- members/pay.pl | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 9 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt @@ -79,21 +79,18 @@ function enableCheckboxActions(){ Description Payment note Account type - Notify id - Level Amount Amount outstanding - Total due: + Total due: [% total | $Price %] -[% FOREACH account_grp IN accounts %] - [% FOREACH line IN account_grp.accountlines %] +[% FOREACH line IN accounts %] [% IF ( line.amountoutstanding > 0 ) %] @@ -112,7 +109,6 @@ function enableCheckboxActions(){ - [% SWITCH line.accounttype %] @@ -154,7 +150,6 @@ function enableCheckboxActions(){ [% account_grp.total | $Price %] [% END %] -[% END %]
--- a/members/pay.pl +++ a/members/pay.pl @@ -133,7 +133,18 @@ output_html_with_http_headers $input, $cookie, $template->output; sub add_accounts_to_template { my ( $total, undef, undef ) = GetMemberAccountRecords($borrowernumber); - my $accounts = []; + my $accounts = Koha::Account::Lines->search({ borrowernumber => $borrowernumber, }, { order_by => ['accounttype'] }); + my @accounts; + while ( my $account = $accounts->next ) { + $account = $account->unblessed; + if ( $account->{itemnumber} ) { + my $item = Koha::Items->find( $account->{itemnumber} ); + my $biblio = $item->biblio; + $account->{biblionumber} = $biblio->biblionumber; + $account->{title} = $biblio->title; + } + push @accounts, $account; + } borrower_add_additional_fields($borrower); $template->param(%$borrower); @@ -141,7 +152,7 @@ sub add_accounts_to_template { my $patron_image = Koha::Patron::Images->find($borrower->{borrowernumber}); $template->param( picture => 1 ) if $patron_image; $template->param( - accounts => $accounts, + accounts => \@accounts, borrower => $borrower, categoryname => $borrower->{'description'}, total => $total, --