diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-06-28 15:22:15 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-06-28 15:22:15 -0700 |
commit | cf7cd8efc7095aadbdfb0cd8e7ea0e2e8b9e9085 (patch) | |
tree | 21663465e6978ee2bf19da393045d4f42af9508d /FS/FS/cust_main | |
parent | 56b2078e23a588b3b5c1087635bf2442b565d075 (diff) |
add advertising source to advanced customer report, RT#18354
Diffstat (limited to 'FS/FS/cust_main')
-rw-r--r-- | FS/FS/cust_main/Search.pm | 13 |
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; + } ## |