example for repeatable or non-repeatable values
[MojoFacets.git] / public / code / Duguje.float.pl
index 317012d..8e8c18c 100644 (file)
@@ -1,8 +1,8 @@
 foreach my $col ( grep { m/(Duguje|Potra.uje|Saldo)/ } keys %$row ) {\r
  foreach my $v ( @{ $row->{$col} } ) {\r
+  next unless length($v) > 0;\r
   push @{ $update->{ $col . '_old' } }, $v;\r
   $v =~ s/(\d+)?\.?(\d{0,3})\,(\d{2})/$1$2.$3/;\r
-  $v *= 1;\r
-  push @{ $update->{$col} }, $v;\r
+  push @{ $update->{$col} }, sprintf('%.2f',$v);\r
  }\r
 }\r