X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main%2FSearch.pm;h=8e6d18571d49d8842037de7562acfbe34c2b4442;hb=cf2014ff0946351fd7bd4bc134ae2535543b63da;hp=c8a084c9b045d8799a945e7e01991dcfa726246e;hpb=b2fd002f3285b70311642f8ff0025598d42bd16e;p=freeside.git diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm index c8a084c9b..8e6d18571 100644 --- a/FS/FS/cust_main/Search.pm +++ b/FS/FS/cust_main/Search.pm @@ -1013,6 +1013,10 @@ sub search { 'ON (cust_main.'.$pre.'locationnum = '.$pre.'location.locationnum) '; } + # always make referral available in results + # (maybe we should be using FS::UI::Web::join_cust_main instead?) + $addl_from .= ' LEFT JOIN part_referral ON (cust_main.refnum = part_referral.refnum) '; + my $count_query = "SELECT COUNT(*) FROM cust_main $addl_from $extra_sql"; my @select = (