From 005424d0c899aa899f43f583a6c74deb13ea4be1 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Fri, 6 Jul 2012 13:00:17 -0700 Subject: [PATCH] excel number format fix, #17971 --- httemplate/search/cust_bill_pkg_referral.html | 2 +- httemplate/search/elements/search-xls.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/httemplate/search/cust_bill_pkg_referral.html b/httemplate/search/cust_bill_pkg_referral.html index f17cea3d9..1bb6b9179 100644 --- a/httemplate/search/cust_bill_pkg_referral.html +++ b/httemplate/search/cust_bill_pkg_referral.html @@ -190,7 +190,7 @@ my @orwhere; push @orwhere, "(cust_bill_pkg.setup > 0)" if $setup; push @orwhere, "($recur_sql > 0)" if $recur; push @orwhere, "($usage_sql > 0)" if $usage; -push @where, join(' OR ', @orwhere); +push @where, '('.join(' OR ', @orwhere).')' if @orwhere; $join_cust = ' JOIN cust_bill USING ( invnum ) LEFT JOIN cust_main USING ( custnum ) diff --git a/httemplate/search/elements/search-xls.html b/httemplate/search/elements/search-xls.html index 6a19cf2f5..a3a8226c5 100644 --- a/httemplate/search/elements/search-xls.html +++ b/httemplate/search/elements/search-xls.html @@ -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; -- 2.11.0