fix "column refnum is ambiguous" error pulling up churn detail when you have a single...
authorIvan Kohler <ivan@freeside.biz>
Fri, 23 Dec 2016 01:23:08 +0000 (17:23 -0800)
committerIvan Kohler <ivan@freeside.biz>
Fri, 23 Dec 2016 01:23:08 +0000 (17:23 -0800)
FS/FS/cust_pkg.pm

index c1039b5..819dade 100644 (file)
@@ -5343,7 +5343,7 @@ sub search {
   }
 
   ###
-  # parse refnum (advertising source)
+  # parse (customer) refnum (advertising source)
   ###
 
   if ( exists($params->{'refnum'}) ) {
@@ -5354,7 +5354,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;
   }
 
   ###