excel number format fix, #17971
[freeside.git] / httemplate / search / elements / search-xls.html
index 6a19cf2..a3a8226 100644 (file)
@@ -49,7 +49,7 @@ my $writer = sub {
   # Wrapper for $worksheet->write.
   # Do any massaging of the value/format here.
   my ($r, $c, $value, $format) = @_;
-  if ( $value =~ /^\Q$money_char\E(\d+\.?\d*)$/ ) {
+  if ( $value =~ /^\Q$money_char\E(-?\d+\.?\d*)$/ ) {
     # Currency: strip the symbol, clone the requested format,
     # and format it for currency
     $value = $1;