Bug 4904

Summary: Problem with printing fines in overdue notices
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: NoticesAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: major    
Priority: PATCH-Sent (DO NOT USE) CC: cnighswonger, colin.campbell, gmcharlt
Version: rel_3_2   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: screenshot of currency symbols in notices before code change
screenshot of currency symbols in notices after code change
proposed patch
new patch with additional changes

Description Katrin Fischer 2010-06-24 09:08:13 UTC
In 3.2 there is a new option to print the current fine in overdue notices.
 
Documentation: http://git.koha-community.org/gitweb/?p=koha.git;a=commit;h=599887a1855349de6bafe9c1b6ce155ed9be5fb5

While USD works fine, there is a problem with other currencies. I tested with EUR and GBP:

<item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <fine>USD</fine></item>
= ... Fine: $4.50

<item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <fine>GBP</fine></item>
= ... Fine: £3.00

<item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <fine>EUR</fine></item>
= â¬1,50

I see the same output in sent mails (Outlook) and in my database (Koha reports module and MySQL Query Browser)

I have installed Locale::Currency::Format 1.28. Koha Version is 3.01.00.139.

The overdue_notices.pl cronjob prints following error:
Use of uninitialized value $fine in string at /home/koha/kohaclone/misc/cronjobs/overdue_notices.pl line 666.
Comment 1 Katrin Fischer 2010-06-24 10:02:19 UTC
Created attachment 2264 [details]
screenshot of currency symbols in notices before code change
Comment 2 Katrin Fischer 2010-06-24 10:02:44 UTC
Created attachment 2265 [details]
screenshot of currency symbols in notices after code change
Comment 3 Katrin Fischer 2010-06-24 10:05:37 UTC Comment hidden (obsolete)
Comment 4 Colin Campbell 2010-06-24 15:46:21 UTC
What perl version and locale did the problem manifest itself on?

(I'm not seeing the original bug on perl 5.10.1 and en_GB.UTF-8)
Comment 5 Katrin Fischer 2010-06-25 08:26:51 UTC
Hi Colin, 

I have seen this problem on 2 different installations, an updated standard installation (3.01.61 to HEAD) and my dev install (HEAD)

9.10 Karmic Koala
Perl version is 5.010000
Locale de_DE.UTF-8

Does my patch cause any problems?
Comment 6 Galen Charlton 2010-07-02 18:08:02 UTC
What version of Encode do you have?  To check:

perl -MEncode -e 'print $Encode::VERSION, "\n";'
Comment 7 Katrin Fischer 2010-07-05 15:30:32 UTC
perl -MEncode -e 'print $Encode::VERSION, "\n";' - Result: 2.23

I updated the module to 2.39 via cpan and I still see the same problems with currency symbols.
Comment 8 Katrin Fischer 2010-09-14 07:47:34 UTC
Resend patch with small change, removing 2 additional lines as requested by Chris Cormack.
Comment 9 Katrin Fischer 2010-09-14 07:49:53 UTC
Created attachment 2621 [details] [review]
new patch with additional changes
Comment 10 Katrin Fischer 2010-11-11 20:14:38 UTC
Patch was pushed to 3.2. Euro symbol is now shown correctly.