From 3b3537dd1670821d512fe787cc1f62739f181c53 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 --- C4/Members.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Members.pm b/C4/Members.pm index fd8e3fbf0d..66d4e5018a 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -702,7 +702,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.25.1