From b366d98a1d9a8ff31158f1577f5d76243427b057 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 3 Mar 2023 11:33:46 +0000 Subject: [PATCH] Bug 33028: (follow-up) Fix trailing 0 decimals We want to recognise the truthyness of a number vs string so we drop trailing decimals if they're just 0. Signed-off-by: Martin Renvoize --- .../atomicupdate/fix_calc_fines_fr-currency_21-11-MT39815.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/installer/data/mysql/atomicupdate/fix_calc_fines_fr-currency_21-11-MT39815.pl b/installer/data/mysql/atomicupdate/fix_calc_fines_fr-currency_21-11-MT39815.pl index 8502dc00a6..637b0f18f4 100755 --- a/installer/data/mysql/atomicupdate/fix_calc_fines_fr-currency_21-11-MT39815.pl +++ b/installer/data/mysql/atomicupdate/fix_calc_fines_fr-currency_21-11-MT39815.pl @@ -31,6 +31,7 @@ q|select * from circulation_rules where rule_name IN ('fine', 'overduefinescap') if ( $rule_value =~ /,/ ) { if ( $rule_value !~ /,.*?,/ ) { $rule_value =~ s/,/./; + $rule_value =~ s/\.0+$//; $query->execute( $rule_value, $rule_id ); } else { -- 2.30.2