X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fsvc_external.cgi;h=cb51d44fd5e914cc1b5d0cfacd3e8c5855b7cf5e;hb=b490e791cc60013989d908041f174467e362a1ea;hp=2710d75bc5f093b06ca6a56888d56a6811adc5a2;hpb=c648976f0b7975f2328ebd7ba8c711fad0ca4195;p=freeside.git
diff --git a/httemplate/search/svc_external.cgi b/httemplate/search/svc_external.cgi
index 2710d75bc..cb51d44fd 100755
--- a/httemplate/search/svc_external.cgi
+++ b/httemplate/search/svc_external.cgi
@@ -1,153 +1,136 @@
-%die "access denied"
-% unless $FS::CurrentUser::CurrentUser->access_right('List services');
-%
-%my $conf = new FS::Conf;
-%
-%my @svc_external = ();
-%my @h_svc_external = ();
-%my $sortby=\*svcnum_sort;
-%if ( $cgi->param('magic') =~ /^(all|unlinked)$/ ) {
-%
-% @svc_external=qsearch('svc_external',{});
-%
-% if ( $cgi->param('magic') eq 'unlinked' ) {
-% @svc_external = grep { qsearchs('cust_svc', {
-% 'svcnum' => $_->svcnum,
-% 'pkgnum' => '',
-% }
-% )
-% }
-% @svc_external;
-% }
-%
-% if ( $cgi->param('sortby') =~ /^(\w+)$/ ) {
-% my $sortby = $1;
-% if ( $sortby eq 'id' ) {
-% $sortby = \*id_sort;
-% }
-% }
-%
-%} elsif ( $cgi->param('svcpart') =~ /^(\d+)$/ ) {
-%
-% @svc_external =
-% qsearch( 'svc_external', {}, '',
-% " WHERE $1 = ( SELECT svcpart FROM cust_svc ".
-% " WHERE cust_svc.svcnum = svc_external.svcnum ) "
-% );
-%
-%} elsif ( $cgi->param('title') =~ /^(.*)$/ ) {
-% $sortby=\*id_sort;
-% @svc_external=qsearch('svc_external',{ title => $1 });
-% if( $cgi->param('history') == 1 ) {
-% @h_svc_external=qsearch('h_svc_external',{ title => $1 });
-% }
-%} elsif ( $cgi->param('id') =~ /^([\w\-\.]+)$/ ) {
-% my $id = $1;
-% @svc_external = qsearchs('svc_external',{'id'=>$id});
-%}
-%
-%if ( scalar(@svc_external) == 1 ) {
-%
-%
-<% $cgi->redirect(popurl(2). "view/svc_external.cgi?". $svc_external[0]->svcnum) %>
-%
-%
-%} elsif ( scalar(@svc_external) == 0 ) {
-%
-%
-<% include('/elements/header.html', 'External Search Results' ) %>
-
- No matching external services found
-% } else {
-%
-%
-<% include('/elements/header.html', 'External Search Results', '') %>
-
- <% scalar(@svc_external) %> matching external services found
-
-
- Service # |
- <% FS::Msgcat::_gettext('svc_external-id') || 'External ID' %> |
- <% FS::Msgcat::_gettext('svc_external-title') || 'Title' %> |
-
-%
-% foreach my $svc_external (
-% sort $sortby (@svc_external)
-% ) {
-% my($svcnum, $id, $title)=(
-% $svc_external->svcnum,
-% $svc_external->id,
-% $svc_external->title,
-% );
-%
-% my $rowspan = 1;
-%
-% print <
-% $svcnum |
-% $id |
-% $title |
-%END
-%
-% #print @rows;
-% print "";
-%
-% }
-% if( scalar(@h_svc_external) > 0 ) {
-% print <
-%
-%
-% Freeside ID |
-% Service # |
-% Title |
-% Date |
-%
-%HTML
-%
-% foreach my $h_svc ( @h_svc_external ) {
-% my($svcnum, $id, $title, $user, $date)=(
-% $h_svc->svcnum,
-% $h_svc->id,
-% $h_svc->title,
-% $h_svc->history_user,
-% $h_svc->history_date,
-% );
-% my $rowspan = 1;
-% my ($h_cust_svc) = qsearchs( 'h_cust_svc', {
-% svcnum => $svcnum,
-% });
-% my $cust_pkg = qsearchs( 'cust_pkg', {
-% pkgnum => $h_cust_svc->pkgnum,
-% });
-% my $custnum = $cust_pkg->custnum;
-%
-% print <
-% $custnum |
-% $svcnum |
-% $title |
-% $date |
-%
-%END
-% }
-% }
-%
-% print <
-%
-%