Bug 20656: Don't print lines that have no balance on print summary
authorNick Clemens <nick@bywatersolutions.com>
Tue, 24 Apr 2018 20:57:17 +0000 (20:57 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 20 Sep 2018 13:45:28 +0000 (13:45 +0000)
To test:
1 - Add at least two fines to a patron
2 - Pay off one of them
3 - Print summary - all 3 lines show
4 - Apply patch
5 - Print summary - only line with balance shows

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
members/summary-print.pl

index 342685b..352b497 100755 (executable)
@@ -49,7 +49,7 @@ output_and_exit_if_error( $input, $cookie, $template, { module => 'members', log
 
 my $total = $patron->account->balance;
 my $accts = Koha::Account::Lines->search(
-    { borrowernumber => $patron->borrowernumber },
+    { borrowernumber => $patron->borrowernumber, amountoutstanding => { '!=' => 0 } },
     { order_by       => { -desc => 'accountlines_id' } }
 );