projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7035b11
)
add countrycode to a2billing export, RT#33738
author
Ivan Kohler
<ivan@freeside.biz>
Mon, 30 Mar 2015 14:20:28 +0000
(07:20 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Mon, 30 Mar 2015 14:20:28 +0000
(07:20 -0700)
FS/FS/part_export/a2billing.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_export/a2billing.pm
b/FS/FS/part_export/a2billing.pm
index
0821a34
..
15410ae
100644
(file)
--- a/
FS/FS/part_export/a2billing.pm
+++ b/
FS/FS/part_export/a2billing.pm
@@
-224,7
+224,7
@@
sub export_insert {
id_cc_didgroup => $self->option('didgroup'),
id_cc_country => $cc_country_id,
iduser => $cc_card_id,
id_cc_didgroup => $self->option('didgroup'),
id_cc_country => $cc_country_id,
iduser => $cc_card_id,
- did => $svc->phonenum,
+ did => $svc->
countrycode. $svc->
phonenum,
billingtype => ($self->option('billtype') eq 'Dial Out Rate' ? 2 : 3),
activated => 1,
aleg_carrier_cost_min_offp => $part_pkg->option('a2billing_carrier_cost_min'),
billingtype => ($self->option('billtype') eq 'Dial Out Rate' ? 2 : 3),
activated => 1,
aleg_carrier_cost_min_offp => $part_pkg->option('a2billing_carrier_cost_min'),
@@
-242,7
+242,7
@@
sub export_insert {
my $cc_did_id = $self->a2b_find('cc_did', 'svcnum', $svc->svcnum);
my $cc_did_id = $self->a2b_find('cc_did', 'svcnum', $svc->svcnum);
- my $destination = 'SIP/user-'. $svc_acct->username. '@'. $svc->sip_server. "!". $svc->phonenum;
+ my $destination = 'SIP/user-'. $svc_acct->username. '@'. $svc->sip_server. "!". $svc->
countrycode. $svc->
phonenum;
my %cc_did_destination = (
destination => $destination,
priority => 1,
my %cc_did_destination = (
destination => $destination,
priority => 1,
@@
-408,7
+408,7
@@
sub export_replace {
} elsif ( $new->isa('FS::svc_phone') ) {
# if the phone number has changed, need to create a new DID.
} elsif ( $new->isa('FS::svc_phone') ) {
# if the phone number has changed, need to create a new DID.
- if ( $new->phonenum ne $old->phonenum ) {
+ if ( $new->phonenum ne $old->phonenum
|| $new->countrycode ne $old->countrycode
) {
# deactivate/unlink/close the old DID
# and create/link the new one
$error = $self->export_delete($old)
# deactivate/unlink/close the old DID
# and create/link the new one
$error = $self->export_delete($old)