Bug: 4904: Problem with printing fines in overdue notices
authorKatrin Fischer <Katrin.Fischer@bsz-bw.de>
Tue, 14 Sep 2010 08:38:24 +0000 (20:38 +1200)
committerGalen Charlton <gmcharlt@gmail.com>
Wed, 6 Oct 2010 10:21:34 +0000 (06:21 -0400)
my $formatted_fine = currency_format("$1", "$fine", FMT_SYMBOL);
is already utf-8.

Resend with additional change, removing 2 lines (no strict, use strict) from the code.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
misc/cronjobs/overdue_notices.pl

index 4de6cdd..2e7b2e4 100755 (executable)
@@ -662,10 +662,7 @@ sub parse_letter { # FIXME: this code should probably be moved to C4::Letters:pa
                 $item_format = $1;
             }
             if ($params->{'letter'}->{'content'} =~ m/<fine>(.*)<\/fine>/) { # process any fine tags...
-                no strict; # currency_format behaves badly if we quote the bareword for some reason...
                 my $formatted_fine = currency_format("$1", "$fine", FMT_SYMBOL);
-                use strict;
-                $formatted_fine = Encode::encode("utf8", $formatted_fine);
                 $params->{'letter'}->{'content'} =~ s/<fine>.*<\/fine>/$formatted_fine/;
             }
             $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'biblio',      $item );