From: Mark Wells Date: Tue, 14 Jul 2015 07:00:07 +0000 (-0700) Subject: fix invoice report when there are no customer classes, #37243, from #25943 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=9f4410954ff03fb12eade34f92c31a5ce9018f4b fix invoice report when there are no customer classes, #37243, from #25943 --- diff --git a/FS/FS/Report/Table.pm b/FS/FS/Report/Table.pm index cba968b43..0a0d24a79 100644 --- a/FS/FS/Report/Table.pm +++ b/FS/FS/Report/Table.pm @@ -901,6 +901,7 @@ sub with_classnum { $classnum = [ $classnum ] if !ref($classnum); @$classnum = grep /^\d+$/, @$classnum; + return '' if !@$classnum; my $in = 'IN ('. join(',', @$classnum). ')'; if ( $use_override ) { diff --git a/FS/FS/cust_bill/Search.pm b/FS/FS/cust_bill/Search.pm index 726d5bc43..fa552f0d5 100644 --- a/FS/FS/cust_bill/Search.pm +++ b/FS/FS/cust_bill/Search.pm @@ -236,7 +236,7 @@ sub search_sql_where { ? @{ $param->{'cust_classnum'} } : ( $param->{'cust_classnum'} ); - @classnum = grep /^(\d*)$/, @classnum; + @classnum = grep /^(\d+)$/, @classnum; if ( @classnum ) { push @search, 'COALESCE(cust_main.classnum, 0) IN ('.join(',', @classnum).')';