From 84076285128d986f9a75c3135d40156248636420 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 Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 598970a1223b9af043b1977965322758565f7d06) Signed-off-by: Fridolin Somers --- .../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.39.5