1 <& elements/search.html,
2 'title' => 'LATA Search Results',
3 'name_singular' => 'LATA',
5 'table' => 'phone_avail',
7 'select' => 'distinct latanum',
9 'count_query' => 'SELECT COUNT(distinct latanum) FROM phone_avail',
19 sub { # LATA Description
20 my $phone_avail = shift;
21 return '' unless $phone_avail->lata;
22 $phone_avail->lata->description;
25 my $latanum = shift->latanum;
26 my $cnt = qsearchs({ 'table' => 'phone_avail',
29 'latanum' => $latanum,
31 'select' => 'count(1) as cnt',
33 ($cnt) ? $cnt->cnt : '';
36 my $latanum = shift->latanum;
37 my $cnt = qsearchs({ 'table' => 'phone_avail',
38 'hashref' => { 'latanum' => $latanum,
39 'svcnum' => { op => '>',
43 'select' => 'count(1) as cnt'
45 ($cnt) ? $cnt->cnt : '';
48 my $phone_avail = shift;
49 return '' unless $phone_avail->lata;
50 $phone_avail->lata->have_usage;
80 unless ( $FS::CurrentUser::CurrentUser->access_right('List inventory')
81 && $FS::CurrentUser::CurrentUser->access_right('List services')
84 # XXX: agent virtualize