X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Finternal_diddb.pm;h=a330cb0a6fb17e414022f044faa4fc49576618b6;hb=0b42654dca5eddf33ed2f35f91d12e23d9a59137;hp=aa04b773a4d0a71ab5a2c5ab64cf9f9939ba7d50;hpb=25e4ea8813e2ff8ad31e2481d6c4cc5973816b2f;p=freeside.git diff --git a/FS/FS/part_export/internal_diddb.pm b/FS/FS/part_export/internal_diddb.pm index aa04b773a..a330cb0a6 100644 --- a/FS/FS/part_export/internal_diddb.pm +++ b/FS/FS/part_export/internal_diddb.pm @@ -25,7 +25,7 @@ sub get_dids { my $self = shift; my %opt = ref($_[0]) ? %{$_[0]} : @_; - my %hash = ( 'countrycode' => $self->option('countrycode'), + my %hash = ( 'countrycode' => ( $self->option('countrycode') || '1' ), 'exportnum' => $self->exportnum, 'svcnum' => '', ); @@ -80,7 +80,7 @@ sub _export_insert { #link phone_avail to svcnum my( $npa, $nxx, $station ) = ($1, $2, $3); my $phone_avail = qsearchs('phone_avail', { - 'countrycode' => $self->option('countrycode'), + 'countrycode' => ( $self->option('countrycode') || '1' ), 'exportnum' => $self->exportnum, 'svcnum' => '', 'npa' => $npa, @@ -100,12 +100,12 @@ sub _export_insert { #link phone_avail to svcnum sub _export_delete { #unlink phone_avail from svcnum my( $self, $svc_phone ) = (shift, shift); - $svc_phone =~ /^(\d{3})(\d{3})(\d+)$/ + $svc_phone->phonenum =~ /^(\d{3})(\d{3})(\d+)$/ or return "unparsable phone number: ". $svc_phone->phonenum; my( $npa, $nxx, $station ) = ($1, $2, $3); my $phone_avail = qsearchs('phone_avail', { - 'countrycode' => $self->option('countrycode'), + 'countrycode' => ( $self->option('countrycode') || '1'), 'exportnum' => $self->exportnum, 'svcnum' => $svc_phone->svcnum, #these too?