diff options
author | Mark Wells <mark@freeside.biz> | 2012-03-01 12:34:46 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2012-03-01 12:34:46 -0800 |
commit | fec48523d3cf056da08813f9b2b7d633b27aaf8d (patch) | |
tree | 900f1bc04c8c4dbd98a89c9d35666cdff6e8b9b3 /httemplate/misc/xmlhttp-cust_main-search.cgi | |
parent | 0924aec8b98b4056357bfdd19f45686a3e9008e2 (diff) |
duplicate address checking for new customers, #16582
Diffstat (limited to 'httemplate/misc/xmlhttp-cust_main-search.cgi')
-rw-r--r-- | httemplate/misc/xmlhttp-cust_main-search.cgi | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/httemplate/misc/xmlhttp-cust_main-search.cgi b/httemplate/misc/xmlhttp-cust_main-search.cgi index 6f023121f..68c5bf597 100644 --- a/httemplate/misc/xmlhttp-cust_main-search.cgi +++ b/httemplate/misc/xmlhttp-cust_main-search.cgi @@ -22,6 +22,21 @@ % my $return = $inv ? findbycustnum($inv->custnum,0) : []; <% objToJson($return) %> % } +% elsif ( $sub eq 'exact_search' ) { +% # XXX possibly should query each element separately +% my $hashref = decode_json($cgi->param('arg')); +% my @cust_main = qsearch('cust_main', $hashref); +% my $return = []; +% foreach (@cust_main) { +% push @$return, { +% custnum => $_->custnum, +% name => $_->name_short, +% address1 => $_->address1, +% city => $_->city, +% }; +% } +<% objToJson($return) %> +% } <%init> my $conf = new FS::Conf; |