summaryrefslogtreecommitdiff
path: root/httemplate/misc/xmlhttp-svc_broadband-search.cgi
blob: 578e6140ea9372e2bbab9a9215b761760ed57fd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
% if ( $sub eq 'smart_search' ) {
%
%   my $string = $cgi->param('arg');
%   my @svc_broadband = FS::svc_broadband->smart_search( $string );
%   my $return = [ map { my $cust_pkg = $_->cust_svc->cust_pkg;
%                        [ $_->svcnum,
%                          $_->label. ( $cust_pkg
%                                        ? ' ('. $cust_pkg->cust_main->name. ')'
%                                        : ''
%                                     ),
%                        ];
%                      } 
%                    @svc_broadband,
%                ];
%     
<% encode_json($return) %>\
% }
<%init>

my $sub = $cgi->param('sub');

</%init>