[freeside-commits] freeside/FS/FS cdr.pm,1.23,1.24
Ivan,,,
ivan at wavetail.420.am
Sun Nov 30 23:53:14 PST 2008
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv6479
Modified Files:
cdr.pm
Log Message:
set charged_party to accoutncode for vedeye, RT#4342
Index: cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cdr.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- cdr.pm 30 Nov 2008 21:01:00 -0000 1.23
+++ cdr.pm 1 Dec 2008 07:53:12 -0000 1.24
@@ -233,12 +233,24 @@
$self->calldate( $self->startdate_sql )
if !$self->calldate && $self->startdate;
+ my $conf = new FS::Conf;
+
unless ( $self->charged_party ) {
- if ( $self->dst =~ /^(\+?1)?8[02-8]{2}/ ) {
- $self->charged_party($self->dst);
+
+ if ( $conf->exists('cdr-charged_party-accountcode') && $self->accountcode ){
+
+ $self->charged_party( $self->accountcode );
+
} else {
- $self->charged_party($self->src);
+
+ if ( $self->dst =~ /^(\+?1)?8[02-8]{2}/ ) {
+ $self->charged_party($self->dst);
+ } else {
+ $self->charged_party($self->src);
+ }
+
}
+
}
#check the foreign keys even?
More information about the freeside-commits
mailing list