summaryrefslogtreecommitdiff
path: root/FS/FS/cust_main/Search.pm
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2016-04-28 14:08:58 -0500
committerJonathan Prykop <jonathan@freeside.biz>2016-05-13 22:53:07 -0500
commit7c648f511c8622deb5b2b72c54281d2bb11ab856 (patch)
tree48e2c90e1937fe3e13ba943c29ea2a9c5e500b73 /FS/FS/cust_main/Search.pm
parentf94bba288f69daaadfb23e1ebf9b13e72a670220 (diff)
RT#41394: Add advertising source to customer fields selection
Diffstat (limited to 'FS/FS/cust_main/Search.pm')
-rw-r--r--FS/FS/cust_main/Search.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm
index c8a084c..8e6d185 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 = (