[Koha-bugs] [Bug 13961] Option to include patron's total amount of fines in notices

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Oct 7 15:49:19 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13961

Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Failed QA

--- Comment #41 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
@@ -660,6 +660,12 @@ sub GetPreparedLetter {
     my $OPACBaseURL = C4::Context->preference('OPACBaseURL');
     $letter->{content} =~ s/<<OPACBaseURL>>/$OPACBaseURL/go;

+    my $borrowernumber = $tables->{borrowers};
+    my $lines = Koha::Account::Lines->search({ borrowernumber =>
$borrowernumber  });
+    my ($totalfine) = $lines->total_outstanding;
+    $totalfine = sprintf("%.2f", $totalfine);
+    $letter->{content} =~ s/<<borrowers.totalfine>>/$totalfine/go;

See earlier comments. We should not be doing that at this code location.

> Added code to check if borrowernumber is defined and it isn't a reference.

I think we should address that problem at the source, not here.

Please adjust. Also look at comment39. Thanks !

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list