Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
sub add_accounts_to_template {
my ( $total, undef, undef ) = GetMemberAccountRecords($borrowernumber);
- my $account_lines = Koha::Account::Lines->search({ borrowernumber => $borrowernumber, }, { order_by => ['accounttype'] });
+ my $account_lines = Koha::Account::Lines->search({ borrowernumber => $borrowernumber, amountoutstanding => { '!=' => 0 } }, { order_by => ['accounttype'] });
my @accounts;
while ( my $account_line = $account_lines->next ) {
$account_line = $account_line->unblessed;