projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git]
/
FS
/
FS
/
part_export
/
a2billing.pm
diff --git
a/FS/FS/part_export/a2billing.pm
b/FS/FS/part_export/a2billing.pm
index
0821a34
..
f636654
100644
(file)
--- a/
FS/FS/part_export/a2billing.pm
+++ b/
FS/FS/part_export/a2billing.pm
@@
-11,6
+11,7
@@
use FS::svc_phone;
use Locale::Country qw(country_code2code);
use Date::Format qw(time2str);
use Carp qw( cluck );
use Locale::Country qw(country_code2code);
use Date::Format qw(time2str);
use Carp qw( cluck );
+use FS::DBI;
@ISA = qw(FS::part_export);
@ISA = qw(FS::part_export);
@@
-55,11
+56,11
@@
END
sub dbh {
my $self = shift;
sub dbh {
my $self = shift;
- $self->{dbh} ||= DBI->connect(
+ $self->{dbh} ||=
FS::
DBI->connect(
$self->option('datasrc'),
$self->option('username'),
$self->option('password')
$self->option('datasrc'),
$self->option('username'),
$self->option('password')
- ) or die $DBI::errstr;
+ ) or die $
FS::
DBI::errstr;
$self->{dbh}->trace(1, '%%%FREESIDE_LOG%%%/a2b_exportlog.'.$self->exportnum)
if $DEBUG;
$self->{dbh}->trace(1, '%%%FREESIDE_LOG%%%/a2b_exportlog.'.$self->exportnum)
if $DEBUG;
@@
-105,7
+106,7
@@
sub replace {
'';
}
'';
}
-sub export_insert {
+sub
_
export_insert {
my $self = shift;
my $svc = shift;
my $cust_pkg = $svc->cust_svc->cust_pkg;
my $self = shift;
my $svc = shift;
my $cust_pkg = $svc->cust_svc->cust_pkg;
@@
-224,7
+225,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
+243,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,
@@
-290,7
+291,7
@@
sub export_insert {
'';
}
'';
}
-sub export_delete {
+sub
_
export_delete {
my $self = shift;
my $svc = shift;
my $self = shift;
my $svc = shift;
@@
-376,7
+377,7
@@
sub export_delete {
'';
}
'';
}
-sub export_replace {
+sub
_
export_replace {
my $self = shift;
my $new = shift;
my $old = shift || $self->replace_old;
my $self = shift;
my $new = shift;
my $old = shift || $self->replace_old;
@@
-408,7
+409,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)
@@
-421,7
+422,7
@@
sub export_replace {
'';
}
'';
}
-sub export_suspend {
+sub
_
export_suspend {
my $self = shift;
my $svc = shift;
my $self = shift;
my $svc = shift;
@@
-446,7
+447,7
@@
sub export_suspend {
$error || '';
}
$error || '';
}
-sub export_unsuspend {
+sub
_
export_unsuspend {
my $self = shift;
my $svc = shift;
my $self = shift;
my $svc = shift;