[freeside-commits] freeside/httemplate/view svc_acct.cgi, 1.49.2.2, 1.49.2.3
Ivan,,,
ivan at wavetail.420.am
Sat Sep 22 11:27:27 PDT 2007
Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory wavetail:/tmp/cvs-serv21876
Modified Files:
Tag: FREESIDE_1_7_BRANCH
svc_acct.cgi
Log Message:
add a list of any hosts associated with accounts
Index: svc_acct.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/svc_acct.cgi,v
retrieving revision 1.49.2.2
retrieving revision 1.49.2.3
diff -u -d -r1.49.2.2 -r1.49.2.3
--- svc_acct.cgi 24 Apr 2007 00:05:16 -0000 1.49.2.2
+++ svc_acct.cgi 22 Sep 2007 18:27:22 -0000 1.49.2.3
@@ -303,6 +303,22 @@
</FORM>
<BR><BR>
+% if ( @svc_www ) {
+ Hosting
+ <% &ntable("#cccccc") %><TR><TD><% &ntable("#cccccc",2) %>
+% foreach my $svc_www (@svc_www) {
+% my($label, $value) = $svc_www->cust_svc->label;
+% my $link = $p. 'view/svc_www.cgi?'. $svc_www->svcnum;
+ <TR>
+ <TD>
+ <A HREF="<% $link %>"><% "$label: $value" %></A>
+ </TD>
+ </TR>
+% }
+ </TABLE></TD></TR></TABLE>
+ <BR><BR>
+% }
+
<% join("<BR>", $conf->config('svc_acct-notes') ) %>
<BR><BR>
@@ -317,16 +333,18 @@
my $conf = new FS::Conf;
+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;
$query =~ /^(\d+)$/;
my $svcnum = $1;
my $svc_acct = qsearchs({
'select' => 'svc_acct.*',
'table' => 'svc_acct',
- 'addl_from' => ' LEFT JOIN cust_svc USING ( svcnum ) '.
- ' LEFT JOIN cust_pkg USING ( pkgnum ) '.
- ' LEFT JOIN cust_main USING ( custnum ) ',
- 'hashref' => {'svcnum'=>$svcnum},
+ 'addl_from' => $addl_from,
+ 'hashref' => { 'svcnum' => $svcnum },
'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
});
die "Unknown svcnum" unless $svc_acct;
@@ -356,4 +374,15 @@
unless $svc_domain;
my $domain = $svc_domain->domain;
+my @svc_www = qsearch({
+ 'select' => 'svc_www.*',
+ 'table' => 'svc_www',
+ 'addl_from' => $addl_from,
+ 'hashref' => { 'usersvc' => $svcnum },
+ #XXX shit outta luck if you somehow got them linked across agents
+ # maybe we should show but not link to them? kinda makes sense...
+ # (maybe a specific ACL for this situation???)
+ 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
+});
+
</%init>
More information about the freeside-commits
mailing list