1 <% include( 'elements/browse.html',
2 'title' => 'Access Numbers',
3 'html_init' => $html_init,
4 'name_singular' => 'access number',
6 'count_query' => $count_query,
26 'links' => [ map { $svc_acct_pop_link } (1..6) ],
31 my $curuser = $FS::CurrentUser::CurrentUser;
34 unless $curuser->access_right('Dialup configuration')
35 || $curuser->access_right('Dialup global configuration');
38 <A HREF="${p}edit/svc_acct_pop.cgi"><I>Add new Access Number</I></A>
42 my $query = { 'select' => '*,
43 ( SELECT COUNT(*) FROM svc_acct
44 WHERE svc_acct.popnum = svc_acct_pop.popnum
47 'table' => 'svc_acct_pop',
48 #'hashref' => { 'disabled' => '' },
49 'order_by' => 'ORDER BY state, city, ac, exch, loc',
52 my $count_query = "SELECT COUNT(*) FROM svc_acct_pop"; # WHERE DISABLED IS NULL OR DISABLED = ''";
54 my $svc_acct_pop_link = [ $p.'edit/svc_acct_pop.cgi?', 'popnum' ];
56 my $svc_acct_link = $p. 'search/svc_acct.cgi?popnum=';
58 my $num_accounts_sub = sub {
59 my $svc_acct_pop = shift;
62 { 'data' => '<B><FONT COLOR="#00CC00">'.
63 $svc_acct_pop->get('num_accounts').
69 'link' => ( $svc_acct_pop->get('num_accounts')
70 ? $svc_acct_link. $svc_acct_pop->popnum