X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Fsvc_acct_pop.cgi;h=44cda81ad9d6fc0ea744fdd899dc2ee68f1ce3b9;hb=aa1cb9bddae4756d832b953e8cfbe184ef77a16f;hp=8d35cb56a0da29527448c2475703cd9a53a9939f;hpb=1a4ba4fc23449a4bb189c8e7a69a10a2a793efc3;p=freeside.git
diff --git a/httemplate/browse/svc_acct_pop.cgi b/httemplate/browse/svc_acct_pop.cgi
index 8d35cb56a..44cda81ad 100755
--- a/httemplate/browse/svc_acct_pop.cgi
+++ b/httemplate/browse/svc_acct_pop.cgi
@@ -1,4 +1,9 @@
+<%
+ my $accounts_sth = dbh->prepare("SELECT COUNT(*) FROM svc_acct
+ WHERE popnum = ? ")
+ or die dbh->errstr;
+%>
<%= header('Access Number Listing', menubar( 'Main Menu' => $p )) %>
Points of Presence
Add new Access Number
@@ -10,6 +15,7 @@ Points of Presence
Area code |
Exchange |
Local |
+ Accounts |
<%
@@ -18,32 +24,40 @@ foreach my $svc_acct_pop ( sort {
$a->state cmp $b->state || $a->city cmp $b->city
|| $a->ac <=> $b->ac || $a->exch <=> $b->exch || $a->loc <=> $b->loc
} qsearch('svc_acct_pop',{}) ) {
- my($hashref)=$svc_acct_pop->hashref;
- print <popnum;
+
+ $accounts_sth->execute($svc_acct_pop->popnum) or die $accounts_sth->errstr;
+ my $num_accounts = $accounts_sth->fetchrow_arrayref->[0];
+
+ my $svc_acct_link = $p. 'search/svc_acct.cgi?popnum='. $svc_acct_pop->popnum;
+
+%>
-
- $hashref->{popnum} |
-
- $hashref->{city} |
-
- $hashref->{state} |
-
- $hashref->{ac} |
-
- $hashref->{exch} |
-
- $hashref->{loc} |
+
+ <%= $svc_acct_pop->popnum %> |
+
+ <%= $svc_acct_pop->city %> |
+
+ <%= $svc_acct_pop->state %> |
+
+ <%= $svc_acct_pop->ac %> |
+
+ <%= $svc_acct_pop->exch %> |
+
+ <%= $svc_acct_pop->loc %> |
+
+ <%= $num_accounts %>
+ <% if ( $num_accounts ) { %><% } %>
+ active
+ <% if ( $num_accounts ) { %><% } %>
+ |
-END
+<% } %>
-}
-
-print <