Bug 4904 - Problem with printing fines in overdue notices
Summary: Problem with printing fines in overdue notices
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: rel_3_2
Hardware: All All
: PATCH-Sent (DO NOT USE) major (vote)
Assignee: Katrin Fischer
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-24 09:08 UTC by Katrin Fischer
Modified: 2010-11-24 06:37 UTC (History)
3 users (show)

See Also:
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 (47.70 KB, image/png)
2010-06-24 10:02 UTC, Katrin Fischer
Details
screenshot of currency symbols in notices after code change (46.43 KB, image/png)
2010-06-24 10:02 UTC, Katrin Fischer
Details
proposed patch (1.23 KB, patch)
2010-06-24 10:05 UTC, Katrin Fischer
Details | Diff | Splinter Review
new patch with additional changes (1.47 KB, patch)
2010-09-14 07:49 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.