diff options
author | Mark Wells <mark@freeside.biz> | 2015-11-18 13:07:47 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-11-18 13:12:12 -0800 |
commit | ded0cb9e764cd806a13aaf6ddb8cdfe0f3215999 (patch) | |
tree | 3edbfb27d1f72bc7326893035d01fe0a35e9e42c /httemplate/misc/xmlhttp-cust_main-email_search.html | |
parent | f4ebbb57fd21146b936e73fbcf34b76adf664904 (diff) |
track customer invoice destination emails using contact_email, #25536
Diffstat (limited to 'httemplate/misc/xmlhttp-cust_main-email_search.html')
-rw-r--r-- | httemplate/misc/xmlhttp-cust_main-email_search.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/httemplate/misc/xmlhttp-cust_main-email_search.html b/httemplate/misc/xmlhttp-cust_main-email_search.html index 0d830826c..eb9ecc8f6 100644 --- a/httemplate/misc/xmlhttp-cust_main-email_search.html +++ b/httemplate/misc/xmlhttp-cust_main-email_search.html @@ -6,14 +6,14 @@ die 'access denied' my $sub = $cgi->param('sub'); my $email = $cgi->param('arg'); my @where = ( - "cust_main_invoice.dest != 'POST'", - "cust_main_invoice.dest LIKE ".dbh->quote('%'.$email.'%'), + 'contact_email.emailaddress LIKE '.dbh->quote('%'.$email.'%'), $FS::CurrentUser::CurrentUser->agentnums_sql(table => 'cust_main'), ); my @cust_main = qsearch({ 'table' => 'cust_main', - 'select' => 'cust_main.*, cust_main_invoice.dest', - 'addl_from' => 'JOIN cust_main_invoice USING (custnum)', + 'select' => 'cust_main.*', + 'addl_from' => ' JOIN cust_contact USING (custnum) '. + ' JOIN contact_email USING (contactnum)', 'extra_sql' => 'WHERE '.join(' AND ', @where), }); |