From 2ca6e2f45a04c3733ca63eadf0e369ccfa6b689c Mon Sep 17 00:00:00 2001 From: Emmi Takkinen Date: Fri, 8 Apr 2022 13:02:50 +0300 Subject: [PATCH] Bug 12285: Don't print fines with undef amountoutstanding Accountlines with undefined amountoutstading value are printed in fineslip. To test: 1) Find patron with credit type accountlines. 2) Edit some of those lines from database, set their amountoutstanding as NULL. 3) Print fineslip. => Note that edited credit lines are displayed in the fineslip. 4) Apply patch. 5) Print fineslip. => Note that lines are no longer displayed in the fineslip. Sponsored-by: Koha-Suomi Oy Signed-off-by: Lisette Scheer --- C4/Members.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Members.pm b/C4/Members.pm index d91f051246..4fe6f97a25 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -703,7 +703,7 @@ sub FineSlip { my @issueslist; while (my $line = $lines->next) { - next if ($line->amountoutstanding =~ /^0.0+$/); + next if ( !$line->amountoutstanding || $line->amountoutstanding =~ /^0.0+$/ ); my $item = Koha::Items->find({itemnumber => $line->itemnumber}); $item = $item ? $item->unblessed : undef; -- 2.30.2