summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevinse <levinse>2011-04-08 16:38:24 +0000
committerlevinse <levinse>2011-04-08 16:38:24 +0000
commitfc820438443e859d37b7d8fe6a7b22f46c613cb7 (patch)
treeb93cb3167db87139f80e60b93e7318ee75e1fd8c
parent365c1cc392193f72687ab73f7c6f9497fbda9dd2 (diff)
update phone provsioning/inventory report as per recent bulk DID order inventory changes, RT10988
-rw-r--r--httemplate/search/phone_inventory_provisioned.html26
1 files changed, 12 insertions, 14 deletions
diff --git a/httemplate/search/phone_inventory_provisioned.html b/httemplate/search/phone_inventory_provisioned.html
index c3de38f37..5d4b4217e 100644
--- a/httemplate/search/phone_inventory_provisioned.html
+++ b/httemplate/search/phone_inventory_provisioned.html
@@ -4,34 +4,33 @@
'query' => {
'table' => 'phone_avail',
'hashref' => {},
- 'select' => 'distinct npa||nxx as npanxx'
+ 'select' => 'distinct latanum',
},
- 'count_query' => 'SELECT COUNT(distinct npa||nxx) FROM phone_avail',
- 'header' => [ 'NPANXX',
+ 'count_query' => 'SELECT COUNT(distinct latanum) FROM phone_avail',
+ 'header' => [ 'LATA #',
'Available',
'Provisioned',
'Have Usage',
],
'fields' => [
- 'npanxx',
+ 'latanum',
sub {
- my $npanxx = shift->npanxx;
+ my $latanum = shift->latanum;
my @dids = qsearch('phone_avail',
{ 'svcnum' => '',
- 'npa' => substr($npanxx,0,3),
- 'nxx' => substr($npanxx,3,3),
+ 'latanum' => $latanum,
}
);
return scalar(@dids);
},
sub {
- my $npanxx = shift->npanxx;
- my @dids = provisioned_dids($npanxx);
+ my $latanum = shift->latanum;
+ my @dids = provisioned_dids($latanum);
return scalar(@dids);
},
sub {
- my $npanxx = shift->npanxx;
- my @dids = provisioned_dids($npanxx);
+ my $latanum = shift->latanum;
+ my @dids = provisioned_dids($latanum);
my $count = 0;
foreach my $did ( @dids ) {
next unless $did->cust_svc;
@@ -74,11 +73,10 @@ die "access denied"
# XXX: agent virtualize
sub provisioned_dids {
- my $npanxx = shift;
+ my $latanum = shift;
qsearch({ 'table' => 'phone_avail',
'hashref' => {
- 'npa' => substr($npanxx,0,3),
- 'nxx' => substr($npanxx,3,3),
+ 'latanum' => $latanum,
},
'extra_sql' => ' and svcnum is not null ',
});