From e385ba02fcd5897a1ed19d9fd23a8471ef27a134 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 18 Apr 2013 20:39:16 -0700 Subject: add fields to svc_broadband, RT# --- httemplate/misc/xmlhttp-svc_broadband-search.cgi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 httemplate/misc/xmlhttp-svc_broadband-search.cgi (limited to 'httemplate/misc/xmlhttp-svc_broadband-search.cgi') 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'); + + -- cgit v1.2.1