[freeside-commits] branch FREESIDE_3_BRANCH updated. 3a2735aa934bde27e181b905412afca6b996688b
Jeremy Davis
jeremyd at 420.am
Tue Jun 3 11:04:18 PDT 2014
The branch, FREESIDE_3_BRANCH has been updated
via 3a2735aa934bde27e181b905412afca6b996688b (commit)
from f9ff81b6e4ee698ff5ac7ab6e2721cf205774a93 (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 3a2735aa934bde27e181b905412afca6b996688b
Author: Jeremy Davis <jeremyd at freeside.biz>
Date: Tue Jun 3 14:04:00 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