Bug 10021: Only display outstanding fines in 'Pay fines'
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 11 Dec 2017 16:57:39 +0000 (13:57 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 11 Dec 2017 16:59:13 +0000 (13:59 -0300)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
members/pay.pl

index a539ed0..c51fde2 100755 (executable)
@@ -133,7 +133,7 @@ output_html_with_http_headers $input, $cookie, $template->output;
 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;