https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35087
Thibaud Guillot <thibaud.guil...@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162067|0 |1 is obsolete| | --- Comment #34 from Thibaud Guillot <thibaud.guil...@biblibre.com> --- Created attachment 164740 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164740&action=edit Bug 35087: (follow-up) Accept only values which will be saved correctly This patch adds a regex (thanks to Katrin for the help) specific to the range of values which will be accepted by the discount column in the database which has the type "float(6,4)". The patch also removes the format() filter from the template so that values returned from the database won't be truncated: Using "format ('%.1f')", a value in the db of '9.009' would appear in the edit form as '9.0', a change which could be missed if the user was editing some other field in the vendor edit form. To test, apply the patch and clear your browser cache if necessary. - Go to Acquisitions -> Vendors -> Edit vendor. - Under "Ordering information," test entering various values in the "Discount" field. It should accept numbers with up to two digits before the decimal and up to three digits after the decimal: 9, 99, -99, 99.9, 0.99, 99.99, 99.999 - In each of these cases, confirm that a value accepted by the client-side validation is also accepted when you submit the form and is correctly displayed when you edit that vendor again. - It should not accept: 100, 100.001, 100.00001 - The error message has been updated to read, "Please enter a decimal number in the format: 0.0" Signed-off-by: Owen Leonard <oleon...@myacpl.org> Signed-off-by: Sonia <sonia.bo...@univ-lyon3.fr> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/