diff options
author | Mark Wells <mark@freeside.biz> | 2015-07-14 00:00:07 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-07-14 00:00:07 -0700 |
commit | 9f4410954ff03fb12eade34f92c31a5ce9018f4b (patch) | |
tree | fb7b90f2907dd000877f53e450510622462638ea /FS | |
parent | 2fa93569943d258103ac6d3e1db75223427f081b (diff) |
fix invoice report when there are no customer classes, #37243, from #25943
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Report/Table.pm | 1 | ||||
-rw-r--r-- | FS/FS/cust_bill/Search.pm | 2 |
2 files changed, 2 insertions, 1 deletions
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).')'; |