summaryrefslogtreecommitdiff
path: root/httemplate/misc/xmlhttp-svc_broadband-search.cgi
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-04-18 20:39:16 -0700
committerIvan Kohler <ivan@freeside.biz>2013-04-18 20:39:16 -0700
commite385ba02fcd5897a1ed19d9fd23a8471ef27a134 (patch)
treea93546629507c8f8d2c0664e7e747c41a105e9eb /httemplate/misc/xmlhttp-svc_broadband-search.cgi
parent54156948ccda87655f9f4bb26a2747ab49b616ce (diff)
add fields to svc_broadband, RT#
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>