[freeside-commits] branch master updated. ba9bf233b9db200958851d262d3664a814691edc

Jeremy Davis jeremyd at 420.am
Tue Jun 3 11:02:33 PDT 2014


The branch, master has been updated
       via  ba9bf233b9db200958851d262d3664a814691edc (commit)
      from  2c2a7de3a3afda0d78ad2e05ca011ec23a0fcdc8 (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 ba9bf233b9db200958851d262d3664a814691edc
Author: Jeremy Davis <jeremyd at freeside.biz>
Date:   Tue Jun 3 14:01:29 2014 -0400

    29398 Add start date to zintel

diff --git a/FS/FS/cdr/zintel.pm b/FS/FS/cdr/zintel.pm
index 7d78d11..1d2236c 100644
--- a/FS/FS/cdr/zintel.pm
+++ b/FS/FS/cdr/zintel.pm
@@ -4,6 +4,7 @@ use strict;
 use vars qw( @ISA %info $tmp_mon $tmp_mday $tmp_year );
 use Time::Local;
 use FS::cdr qw(_cdr_date_parser_maker);
+use Date::Parse;
 
 @ISA = qw(FS::cdr);
 
@@ -16,7 +17,17 @@ use FS::cdr qw(_cdr_date_parser_maker);
 	'accountcode',	#customer
 	'src',		#anumber
 	'dst',		#bnumber
-    	'calldate',     #datetime
+                 sub { my ($cdr, $calldate) = @_;
+                        $cdr->set('calldate', $calldate);
+
+                        $calldate =~ /^(\d{2})\/(\d{2})\/(\d{4})\s*(\d{2}):(\d{2}):(\d{2})$/
+                                or die "unparseable date: $calldate";
+                        my $tmp_date = "$2/$1/$3 $4:$5:$6";
+
+                        $tmp_date = str2time($tmp_date);
+                        $cdr->set('startdate', $tmp_date);
+
+                  },    #DateTime
 	'billsec',	#duration
 	skip(3),	#calltype
 			#status

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

Summary of changes:
 FS/FS/cdr/zintel.pm |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list