- my $latanum = shift->latanum;
- my @dids = provisioned_dids($latanum);
-
- warn "have usage ".time;
- return ''; # XXX disabled temporarily
-
- my $count = 0;
- foreach my $did ( @dids ) {
- next unless $did->cust_svc;
- my $svc_phone = $did->cust_svc->svc_x;
- warn "inside loop ".time;
- next unless $svc_phone;
- my @cdrs = $svc_phone->get_cdrs;
- $count++ if scalar(@cdrs);
- }
- $count;
+ my $phone_avail = shift;
+ return '' unless $phone_avail->lata;
+ $phone_avail->lata->have_usage;