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:07:47 -0800 |
commit | b2fd002f3285b70311642f8ff0025598d42bd16e (patch) | |
tree | 8005ab27d04c8aaaa7e9bfd10a9ba0f48cafd967 /httemplate/misc/xmlhttp-cust_main-email_search.html | |
parent | 1daa37e733b9e972e5328503374130a423d02836 (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), }); |