[Koha-bugs] [Bug 12310] Accept different monetary formats as input

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Feb 21 17:08:42 CET 2017


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

Baptiste <baptiste.wojtkowski at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #28455|0                           |1
        is obsolete|                            |

--- Comment #4 from Baptiste <baptiste.wojtkowski at biblibre.com> ---
Created attachment 60530
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60530&action=edit
BUG 12310 : Modified scripts in order to convert any string to the good format

paxed's solution is obsolete since the form asks for a number.

The script includes 2 function which check if it is possible to transform
properly into the format "XX.XX" and which do it.
The money symbols are ignored.
All spaces (before or after)  are ignored.

Test plan :
1) Check you can't enter any string except like "XX.XX" when
   - you create a Budget (Administration->Budget)
   - you write a fine (Circulation->[select a Borrower]->new fine )
2) Apply patch
3) Check you can enter any string with
   - $, "Euro" (before or after), or nothing
   - , or . as separator
   - no more than 2 digits after separator
   - as much digits as you wish before the separator
   - as much spaces as you wish before or after the number

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


More information about the Koha-bugs mailing list