[freeside-commits] branch FREESIDE_3_BRANCH updated. 644ccd94121b673364e68461549a7c44442ff292

Jeremy Davis jeremyd at 420.am
Tue Jul 1 10:45:47 PDT 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  644ccd94121b673364e68461549a7c44442ff292 (commit)
      from  a0ea74d1707964c7657dddaab367d4ea7fe55b4b (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 644ccd94121b673364e68461549a7c44442ff292
Author: Jeremy Davis <jeremyd at freeside.biz>
Date:   Tue Jul 1 13:45:27 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