summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevinse <levinse>2011-04-08 16:38:25 +0000
committerlevinse <levinse>2011-04-08 16:38:25 +0000
commit6c78fa4d065e8fcd80cfc0f0720df5a1ef9781e6 (patch)
tree07ed9ba3d65012ff4353f4127b403b1832bf78c4
parent06e4c099510ac64777374cdd542b97b3c9136d48 (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 ',
});