diff options
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; |