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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 23 11:28:37 CET 2018


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

Victor Grousset/tuxayo <victor.grousset at biblibre.com> changed:

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

--- Comment #38 from Victor Grousset/tuxayo <victor.grousset at biblibre.com> ---
Created attachment 72104
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72104&action=edit
Bug 12310 : Modify 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 other symbols  are ignored.

Modify the tooltips helping the users entering monrtary information in the
right format.

Fields on all those pages are now automatically formatted
- cgi-bin/koha/admin/aqbudgetperiods.tt
- cgi-bin/koha/admin/aqbudgets.tt
- cgi-bin/koha/members/mancredit.tt
- cgi-bin/koha/members/maninvoice.tt

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 )
   - you pay an existing fine
2) Apply patch
3) Check you can enter any string with
   - anything you want
   - a , or a . as separator (both are default)
   - change the syspref DigitSeparator into the separator you with and check
again
          ex : XXX,XXX,XXX.XX => .
               XXX XXX XXX,XX => ,. or ,
               XXX XXX XXX.XX => ,. or .
   The string is immediately changed after you change the field
Please note that any other symbole is ignored

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


More information about the Koha-bugs mailing list