summaryrefslogtreecommitdiff
path: root/FS/FS/cust_main/Search.pm
diff options
context:
space:
mode:
Diffstat (limited to 'FS/FS/cust_main/Search.pm')
-rw-r--r--FS/FS/cust_main/Search.pm13
1 files changed, 11 insertions, 2 deletions
diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm
index 3a8acb2..b528a68 100644
--- a/FS/FS/cust_main/Search.pm
+++ b/FS/FS/cust_main/Search.pm
@@ -577,8 +577,17 @@ sub search {
###
# refnum
###
- if ( $params->{'refnum'} =~ /^(\d+)$/ ) {
- push @where, "refnum = $1";
+ if ( $params->{'refnum'} ) {
+
+ my @refnum = ref( $params->{'refnum'} )
+ ? @{ $params->{'refnum'} }
+ : ( $params->{'refnum'} );
+
+ @refnum = grep /^(\d*)$/, @refnum;
+
+ push @where, '( '. join(' OR ', map "cust_main.refnum = $_", @refnum ). ' )'
+ if @refnum;
+
}
##