From cf7cd8efc7095aadbdfb0cd8e7ea0e2e8b9e9085 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 28 Jun 2012 15:22:15 -0700 Subject: add advertising source to advanced customer report, RT#18354 --- FS/FS/cust_main/Search.pm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'FS') diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm index 3a8acb2de..b528a689c 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; + } ## -- cgit v1.2.1