X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fbrowse%2Fsvc_acct_pop.cgi;h=80168728ce8cbd65d9d5dbd1bd5b1392de49ab25;hp=c58ce333324993e58312098348deff25b49a9195;hb=71eb3c33da045ffdc963b5ad8111af8a8bef878d;hpb=4ec61507a7b255c3f5e8a573eca18c48ddaaa2c1 diff --git a/httemplate/browse/svc_acct_pop.cgi b/httemplate/browse/svc_acct_pop.cgi index c58ce3333..80168728c 100755 --- a/httemplate/browse/svc_acct_pop.cgi +++ b/httemplate/browse/svc_acct_pop.cgi @@ -1,24 +1,13 @@ + <% -# - -use strict; -use vars qw( $cgi $p $svc_acct_pop ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs); -use FS::CGI qw(header menubar table popurl); -use FS::svc_acct_pop; - -$cgi = new CGI; - -&cgisuidsetup($cgi); - -$p = popurl(2); - -print $cgi->header( '-expires' => 'now' ), header('POP Listing', menubar( - 'Main Menu' => $p, -)), "Points of Presence

", &table(), <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

+<%= table() %> City @@ -26,42 +15,47 @@ print $cgi->header( '-expires' => 'now' ), header('POP Listing', menubar( Area code Exchange Local + Accounts -END -foreach $svc_acct_pop ( sort { +<% +foreach my $svc_acct_pop ( sort { #$a->getfield('popnum') <=> $b->getfield('popnum') $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 %> + active + -END - -} +<% } %> -print < - Add new POP - -END -%>