[freeside-commits] branch FREESIDE_3_BRANCH updated. 24c01f6992422b45aadb867371bc44795b48042e
Jeremy Davis
jeremyd at 420.am
Wed Dec 3 09:42:59 PST 2014
The branch, FREESIDE_3_BRANCH has been updated
via 24c01f6992422b45aadb867371bc44795b48042e (commit)
from 8cbdba85db636a87bcd133ed01fd14d9fc7754e7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 24c01f6992422b45aadb867371bc44795b48042e
Author: Jeremy Davis <jeremyd at freeside.biz>
Date: Wed Dec 3 12:42:51 2014 -0500
Ticket #31495 Earthlink CDR
diff --git a/FS/FS/cdr/earthlink.pm b/FS/FS/cdr/earthlink.pm
new file mode 100644
index 0000000..0421ef9
--- /dev/null
+++ b/FS/FS/cdr/earthlink.pm
@@ -0,0 +1,44 @@
+package FS::cdr::earthlink;
+
+use strict;
+use vars qw( @ISA %info $date);
+use Time::Local;
+use FS::cdr qw(_cdr_date_parser_maker _cdr_min_parser_maker);
+use Date::Parse;
+
+ at ISA = qw(FS::cdr);
+
+%info = (
+ 'name' => 'Earthlink',
+ 'weight' => 120,
+ 'header' => 1,
+ 'import_fields' => [
+
+ 'accountcode', #Account number
+ skip(2), #SERVICE LOC / BILL NUMBER
+ sub { my($cdr, $date) = @_;
+
+ }, #date
+ sub { my($cdr, $time) = @_;
+
+ my $datetime = $date. " ". $time;
+ $cdr->set('startdate', $datetime );
+ }, #time
+ sub { my($cdr, $src) = @_;
+ $src =~ s/\D//g;
+ $cdr->set('src', $src);
+ }, #ORIG NUMBER
+ skip(2), #ORIG CITY/ORIGSTATE
+ sub { my($cdr, $dst) = @_;
+ $dst =~ s/\D//g;
+ $cdr->set('dst', $dst);
+ }, #TERM NUMBER
+ skip(2), #TERM CITY / TERM STATE
+ _cdr_min_parser_maker, #MINUTES
+ ],
+);
+
+sub skip { map {''} (1..$_[0]) }
+
+1;
+
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cdr/earthlink.pm | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 FS/FS/cdr/earthlink.pm
More information about the freeside-commits
mailing list