summaryrefslogtreecommitdiff
path: root/httemplate/misc/xmlhttp-svc_broadband-search.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/misc/xmlhttp-svc_broadband-search.cgi')
-rw-r--r--httemplate/misc/xmlhttp-svc_broadband-search.cgi22
1 files changed, 22 insertions, 0 deletions
diff --git a/httemplate/misc/xmlhttp-svc_broadband-search.cgi b/httemplate/misc/xmlhttp-svc_broadband-search.cgi
new file mode 100644
index 000000000..578e6140e
--- /dev/null
+++ b/httemplate/misc/xmlhttp-svc_broadband-search.cgi
@@ -0,0 +1,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>