diff options
author | ivan <ivan> | 2005-10-10 12:20:57 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-10-10 12:20:57 +0000 |
commit | 550685eff557af23e242c545d6a9e27a7ef44f23 (patch) | |
tree | f269ba2ad03102153812a8e95d4c7b8ecb5f7994 /httemplate/misc/xmlhttp-cust_main-search.cgi | |
parent | cf8f8aafc5595b31f24a7b0d06289c830d123cb8 (diff) |
updated quick payment entry
Diffstat (limited to 'httemplate/misc/xmlhttp-cust_main-search.cgi')
-rw-r--r-- | httemplate/misc/xmlhttp-cust_main-search.cgi | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/httemplate/misc/xmlhttp-cust_main-search.cgi b/httemplate/misc/xmlhttp-cust_main-search.cgi new file mode 100644 index 000000000..8dbd5a4f2 --- /dev/null +++ b/httemplate/misc/xmlhttp-cust_main-search.cgi @@ -0,0 +1,21 @@ +<% + my $sub = $cgi->param('sub'); + + if ( $sub eq 'custnum_search' ) { + + my $custnum = $cgi->param('arg'); + my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ); + + %>"<%= $cust_main ? $cust_main->name : '' %>" + +<% } elsif ( $sub eq 'smart_search' ) { + + my $string = $cgi->param('arg'); + my @cust_main = smart_search( 'search' => $string ); + my $return = [ map [ $_->custnum, $_->name ], @cust_main ]; + + %><%= objToJson($return) %> + +<% } %> + + |