From c269aba043bfc26e85ae60c918726d80200b80d2 Mon Sep 17 00:00:00 2001 From: Emmi Takkinen Date: Fri, 8 Apr 2022 13:02:50 +0300 Subject: [PATCH 5/6] 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 f8180d7fe4..494c02a83f 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