From 1a68cccb21561b4d67b9c4f5b5e5e2e28cd1e002 Mon Sep 17 00:00:00 2001 From: Victor Grousset Date: Mon, 7 May 2018 14:31:53 +0200 Subject: [PATCH] Bug 12310: Fix decimal separators issues in fines: writeoff amount field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a follow up for this forgotten field. See main patch more details. == Test plan == 1. Use a translation of the staff interface if possible. 2. Go to a patrons's page → fines → pay fines 3. Click on "Write off" This assumes an existing debt. Which should exists if you just tested the previous patches. 4. If you enter "1,50", the writeoff amount saved is only 1. This is the bug. 5. Apply this patch 6. run ~/src/installer/data/mysql/updatedatabase.pl 7. Refresh the page 8. Retry the write off. Apply the annex 1 to the "Writeoff amount" field 9. It works! \o/ === Annex 1: Subpart for each concerned page === 1. Set DecimalSeparators syspref to ",." 2. Input "12,34" 3. Press the "Tab/Tabulation" key. It will unfocus the field and trigger the conversion. Validating the form does the same but it's a trick to test more quickly by not switching to another page. 4. The value should have been converted to 12.34 5. Do the same with "12,34 EUR" and ensure that it's converted to "12,34" Same with "EUR 12.34" -> "12.34" 6. "EUR 12.34€thanks lyonthree" -> "12.34" 7. "123 456,7" -> "123456.7" 8.. "2" -> "2" 9.. "2,0" -> "2.0" 10. "-1'345.95" -> "-1345.95" 11. ",1234" -> ".1234" 12. Set DecimalSeparators syspref to "," 13. Reload the page with the form 14. "1.000" -> "1000" 15. "1.000.000,10" -> "1000000.10" 16. Set DecimalSeparators syspref to "." 17. Reload the page with the form 18. "1,000" -> "1000" 19. "1,000,000.10" -> "1000000.10" 20. Validate the form and check that the final value with the dot was 21 well handled. 22. Think about Koalas and smile. 🐨🐨🐨 Signed-off-by: Sonia Bouis --- koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt index 3e1ad4f..3803946 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt @@ -139,7 +139,7 @@
  • - +
  • -- 2.7.4