projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
14ddc73
)
bug fixes vitelity.pm, RT4868
author
levinse
<levinse>
Sat, 20 Nov 2010 04:50:49 +0000
(
04:50
+0000)
committer
levinse
<levinse>
Sat, 20 Nov 2010 04:50:49 +0000
(
04:50
+0000)
FS/FS/part_export/vitelity.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_export/vitelity.pm
b/FS/FS/part_export/vitelity.pm
index
044387a
..
7803b3f
100644
(file)
--- a/
FS/FS/part_export/vitelity.pm
+++ b/
FS/FS/part_export/vitelity.pm
@@
-51,7
+51,6
@@
sub get_dids {
'table' => 'phone_avail',
'hashref' => { 'exportnum' => $self->exportnum,
'countrycode' => '1', # vitelity is US/CA only now
'table' => 'phone_avail',
'hashref' => { 'exportnum' => $self->exportnum,
'countrycode' => '1', # vitelity is US/CA only now
- 'state' => $opt{'state'},
'npa' => $opt{'areacode'},
'nxx' => $opt{'exchange'},
},
'npa' => $opt{'areacode'},
'nxx' => $opt{'exchange'},
},
@@
-61,14
+60,16
@@
sub get_dids {
} elsif ( $opt{'areacode'} ) { #return exchanges in format NPA-NXX- literal 'XXXX'
} elsif ( $opt{'areacode'} ) { #return exchanges in format NPA-NXX- literal 'XXXX'
+ # you can't call $->name .... that returns "(unlinked)"
+ # and in any case this is still major abuse of encapsulation, it just happens to work for the other fields
return [
return [
-
map { $_->name.
' ('. $_->npa. '-'. $_->nxx. '-XXXX)' }
+
map { $_->{'Hash'}->{name}.
' ('. $_->npa. '-'. $_->nxx. '-XXXX)' }
qsearch({
qsearch({
- 'select' => 'DISTINCT ON ( name, npa, nxx ) *',
+ # i know this doesn't do the same thing as before, but now the sort works
+ 'select' => 'DISTINCT npa,nxx,name',
'table' => 'phone_avail',
'hashref' => { 'exportnum' => $self->exportnum,
'countrycode' => '1', # vitelity is US/CA only now
'table' => 'phone_avail',
'hashref' => { 'exportnum' => $self->exportnum,
'countrycode' => '1', # vitelity is US/CA only now
- 'state' => $opt{'state'},
'npa' => $opt{'areacode'},
},
'order_by' => 'ORDER BY nxx',
'npa' => $opt{'areacode'},
},
'order_by' => 'ORDER BY nxx',
@@
-133,7
+134,7
@@
sub get_dids {
}
foreach my $did ( @dids ) {
}
foreach my $did ( @dids ) {
-
$did =~ /^(\d{3})(\d{3})(\d{4})$
/ or die "unparsable did $did\n";
+
$did =~ /^(\d{3})(\d{3})(\d{4}),
/ or die "unparsable did $did\n";
my($npa, $nxx, $station) = ($1, $2, $3);
$npa{$npa}++;
my($npa, $nxx, $station) = ($1, $2, $3);
$npa{$npa}++;