blob: 67512fad9310a50a9346f6a6c6b9243734721592 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
%
% 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) %>
% }
|