fix "column refnum is ambiguous" error pulling up churn detail when you have a single...
[freeside.git] / FS / FS / cust_pkg / Search.pm
index 3a8e6d0..311dbdb 100644 (file)
@@ -281,7 +281,7 @@ sub search {
   }
 
   ###
-  # parse refnum (advertising source)
+  # parse (customer) refnum (advertising source)
   ###
 
   if ( exists($params->{'refnum'}) ) {
@@ -292,7 +292,7 @@ sub search {
       @refnum = ( $params->{'refnum'} );
     }
     my $in = join(',', grep /^\d+$/, @refnum);
-    push @where, "refnum IN($in)" if length $in;
+    push @where, "cust_main.refnum IN($in)" if length $in;
   }
 
   ###