summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Davis <jeremyd@freeside.biz>2014-07-01 13:45:27 -0400
committerJeremy Davis <jeremyd@freeside.biz>2014-07-01 13:45:27 -0400
commit644ccd94121b673364e68461549a7c44442ff292 (patch)
tree776b5d616dcf6a813897aa88d83a0becd700434a
parenta0ea74d1707964c7657dddaab367d4ea7fe55b4b (diff)
29050 trailing record
-rw-r--r--FS/FS/cdr/orcon.pm16
1 files changed, 11 insertions, 5 deletions
diff --git a/FS/FS/cdr/orcon.pm b/FS/FS/cdr/orcon.pm
index 444b595d0..66b045fd5 100644
--- a/FS/FS/cdr/orcon.pm
+++ b/FS/FS/cdr/orcon.pm
@@ -13,20 +13,26 @@ use Date::Parse;
'header' => 1,
'import_fields' => [
- skip(2), #id
- #billing period
+ skip(1) , #id
+ skip(1) , #billing period
'accountcode', #account number
skip(2), #username
#service id
- sub { my ($cdr, $calldate) = @_;
+ sub { my ($cdr, $calldate, $param) = @_;
+
$cdr->set('calldate', $calldate);
- $calldate =~ /^(\d{4})-(\d{2})-(\d{2})\s*(\d{2}):(\d{2}):(\d{2})$/
- or die "unparseable date: $calldate";
+ if ($calldate =~ /^(\d{4})-(\d{2})-(\d{2})\s*(\d{2}):(\d{2}):(\d{2})$/){
+
my $tmp_date = "$2/$3/$1 $4:$5:$6";
$tmp_date = str2time($tmp_date);
$cdr->set('startdate', $tmp_date);
+
+ } else {
+
+ $param->{skiprow} = 1
+ }
}, #date
skip(1), #tariff region
'src', #originating number