[freeside-commits] branch master updated. 868c313527afb05ba7a85527bde4ccef6b85632c

Jeremy Davis jeremyd at 420.am
Tue Jul 1 10:42:54 PDT 2014


The branch, master has been updated
       via  868c313527afb05ba7a85527bde4ccef6b85632c (commit)
      from  2fb631254c953ae3ef5e2679583b72faf3f8f157 (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 868c313527afb05ba7a85527bde4ccef6b85632c
Author: Jeremy Davis <jeremyd at freeside.biz>
Date:   Tue Jul 1 13:42:23 2014 -0400

    29050 trailing record

diff --git a/FS/FS/cdr/orcon.pm b/FS/FS/cdr/orcon.pm
index 444b595..66b045f 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

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cdr/orcon.pm |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)




More information about the freeside-commits mailing list