Bug 33028: (follow-up) Lower the two digits requirement
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 19 Jul 2023 14:51:54 +0000 (11:51 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 19 Jul 2023 15:06:49 +0000 (12:06 -0300)
commit45b050871e7ed882b553f211db97204f30634646
tree70b592b16e6e65e5c91683dd3b5d2781345abdd0
parentb82f1bd8075e0d14aa9d08293831af4cd8a3059a
Bug 33028: (follow-up) Lower the two digits requirement

This patch makes the code not require two decimal digits, as the main
intention here is to forbid (locale) formatted strings to reach the DB.

The number of digits we support needs to be discussed on its own bug,
and a centralized check implemented.

This patch fixes tests:

prove t/db_dependent/Circulation.t
t/db_dependent/Circulation.t .. 1/67 Exception 'Koha::Exceptions::CirculationRule::NotDecimal' thrown 'The circulation rule expected a decimal value' with name => fine, value => 0.1
t/db_dependent/Circulation.t .. Dubious, test returned 11 (wstat 2816, 0xb00)
Failed 53/67 subtests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/CirculationRules.pm