From 429c44953370dfb4e298986791073fee3dc6b80a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 17 Feb 2014 13:46:45 +0100 Subject: [PATCH] Bug 11644: (follow-up) Add a FIXME for the precision value Signed-off-by: Jonathan Druart --- admin/check_parent_total.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/admin/check_parent_total.pl b/admin/check_parent_total.pl index 83fecc2..4a19a05 100755 --- a/admin/check_parent_total.pl +++ b/admin/check_parent_total.pl @@ -89,9 +89,10 @@ else { $budget_period_unalloc = $period->{'budget_period_total'} - $period_sum->{'sum'} if $period->{'budget_period_total'}; } -$total = sprintf( "%.2f", $total ); -$sub_unalloc = sprintf( "%.2f", $sub_unalloc ); -$budget_period_unalloc = sprintf( "%.2f", $budget_period_unalloc ); +my $precision = 2; # FIXME should be a syspref +$total = sprintf( "%.*f", $precision, $total ); +$sub_unalloc = sprintf( "%.*f", $precision, $sub_unalloc ); +$budget_period_unalloc = sprintf( "%.*f", $precision, $budget_period_unalloc ); if ( $parent_id) { if ( ($total > $sub_unalloc ) && $sub_unalloc ) { -- 1.7.10.4