enable CardFortress in test database, #71513
[freeside.git] / httemplate / view / svc_acct.cgi
index 9135e67..7474779 100755 (executable)
@@ -1,65 +1,71 @@
 % if ( $custnum ) { 
 
-  <% include("/elements/header.html","View $svc account") %>
-  <% include( '/elements/small_custview.html', $custnum, '', 1,
-     "${p}view/cust_main.cgi") %>
+  <& /elements/header.html, mt("View [_1] account",$svc) &>
+  <& /elements/small_custview.html, $custnum, '', 1,
+     "${p}view/cust_main.cgi" &> 
   <BR>
 
 % } else { 
+% my $delmsg = emt('Permanently delete this account?');
 
   <SCRIPT>
   function areyousure(href) {
-      if (confirm("Permanently delete this account?") == true)
+      if (confirm(<% $delmsg |js_string %>) == true)
           window.location.href = href;
   }
   </SCRIPT>
   
-  <% include("/elements/header.html",'View account', menubar(
-    "Cancel this (unaudited) account" =>
+  <& /elements/header.html, mt('View account'), menubar(
+    emt("Cancel this (unaudited) account") =>
             "javascript:areyousure(\'${p}misc/cancel-unaudited.cgi?$svcnum\')",
-  )) %>
+  ) &>
 
 % } 
 
-<% include( 'svc_acct/radius_usage.html',
-              'svc_acct' => $svc_acct,
+
+<& elements/svc_radius_usage.html,
+              'svc'      => $svc_acct,
               'part_svc' => $part_svc,
               'cust_pkg' => $cust_pkg,
               %gopt,
-          )
-%>
+&>
 
-<% include( 'svc_acct/change_svc_form.html',
+
+<& svc_acct/change_svc_form.html,
               'part_svc' => \@part_svc,
               'svcnum'   => $svcnum,
               'pkgnum'   => $pkgnum,
               %gopt,
-          )
-%>
-
-Service #<B><% $svcnum %></B>
-| <A HREF="<%$p%>edit/svc_acct.cgi?<%$svcnum%>">Edit this service</A>
+&>
 
-<% include( 'svc_acct/change_svc.html',
+<% mt('Service #') |h %><B><% $svcnum %></B>
+<& /view/elements/svc_edit_link.html, 'svc' => $svc_acct &>
+<& svc_acct/change_svc.html,
               'part_svc' => \@part_svc,
               %gopt,
-          )
-%>
+&>
 
-<% include( 'svc_acct/basics.html',
+</FORM>
+
+
+<& svc_acct/basics.html,
               'svc_acct' => $svc_acct,
               'part_svc' => $part_svc,
+              'cust_svc' => $cust_svc,
               %gopt,
-          )
-%>
+&>
 
 </FORM>
 <BR>
 
-<% include( 'svc_acct/hosting.html',
+<& svc_acct/cardfortress.html,
+              'svc_acct' => $svc_acct,
+              %gopt,
+&>
+
+<& svc_acct/hosting.html,
               %gopt,
-          )
-%>
+&>
 
 %#remove this?  does anybody even use it?  it was a misunderstood customer
 %#request IIRC?
@@ -70,11 +76,16 @@ Service #<B><% $svcnum %></B>
 <BR><BR>
 % }
 
-<% include('elements/svc_export_settings.html', $svc_acct) %>
+<& elements/svc_export_status.html, $svc_acct &>
+
+<& elements/svc_export_settings.html, $svc_acct &>
+
+<& /elements/table-tickets.html, object => $cust_svc &>
 
+<BR>
 <% joblisting({'svcnum'=>$svcnum}, 1) %>
 
-<% include('/elements/footer.html') %>
+<& /elements/footer.html &>
 <%init>
 
 die "access denied"
@@ -83,8 +94,12 @@ die "access denied"
 my $addl_from = ' LEFT JOIN cust_svc  USING ( svcnum  ) '.
                 ' LEFT JOIN cust_pkg  USING ( pkgnum  ) '.
                 ' LEFT JOIN cust_main USING ( custnum ) ';
-
-my($query) = $cgi->keywords;
+my $query;
+if ( $cgi->keywords ) {
+  ($query) = $cgi->keywords;
+} else {
+  $query = $cgi->param('svcnum');
+}
 $query =~ /^(\d+)$/;
 my $svcnum = $1;
 my $svc_acct = qsearchs({
@@ -99,7 +114,7 @@ my $svc_acct = qsearchs({
 die "Unknown svcnum" unless $svc_acct;
 
 #false laziness w/all svc_*.cgi
-my $cust_svc = qsearchs( 'cust_svc' , { 'svcnum' => $svcnum } );
+my $cust_svc = $svc_acct->cust_svc;
 my $pkgnum = $cust_svc->getfield('pkgnum');
 my($cust_pkg, $custnum);
 if ($pkgnum) {