[freeside-commits] freeside/FS/FS Record.pm, 1.187, 1.188 cdr.pm, 1.35, 1.36
Jeff Finucane,420,,
jeff at wavetail.420.am
Mon Apr 6 18:20:40 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv5509
Modified Files:
Record.pm cdr.pm
Log Message:
correct taqua toll free handling and hasten cdr import (skip uninteresting records)
Index: cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cdr.pm,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- cdr.pm 1 Apr 2009 04:27:25 -0000 1.35
+++ cdr.pm 7 Apr 2009 01:20:38 -0000 1.36
@@ -269,6 +269,17 @@
$self->SUPER::check;
}
+=item is_tollfree
+
+ Returns true when the cdr represents a toll free number and false otherwise.
+
+=cut
+
+sub is_tollfree {
+ my $self = shift;
+ ( $self->dst =~ /^(\+?1)?8(8|[02-7]{2})/ ) ? 1 : 0;
+}
+
=item set_charged_party
If the charged_party field is already set, does nothing. Otherwise:
@@ -294,7 +305,7 @@
} else {
- if ( $self->dst =~ /^(\+?1)?8[02-8]{2}/ ) {
+ if ( $self->is_tollfree ) {
$self->charged_party($self->dst);
} else {
$self->charged_party($self->src);
Index: Record.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Record.pm,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -d -r1.187 -r1.188
--- Record.pm 29 Mar 2009 10:17:02 -0000 1.187
+++ Record.pm 7 Apr 2009 01:20:38 -0000 1.188
@@ -1708,11 +1708,14 @@
my $record = $class->new( \%hash );
+ my $param = {};
while ( scalar(@later) ) {
my $sub = shift @later;
my $data = shift @later;
- &{$sub}($record, $data, $conf); # $record->&{$sub}($data, $conf);
+ &{$sub}($record, $data, $conf, $param); # $record->&{$sub}($data, $conf);
+ last if exists( $param->{skiprow} );
}
+ next if exists( $param->{skiprow} );
my $error = $record->insert;
More information about the freeside-commits
mailing list