[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 9b99de70414a585b9e9d6e3857414de9ef2354ed

Mark Wells mark at 420.am
Fri Jun 15 15:00:07 PDT 2012


The branch, FREESIDE_2_3_BRANCH has been updated
       via  9b99de70414a585b9e9d6e3857414de9ef2354ed (commit)
      from  9fa3b3af30750852f0c2e28b68f309cf61476b0f (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 9b99de70414a585b9e9d6e3857414de9ef2354ed
Author: Mark Wells <mark at freeside.biz>
Date:   Fri Jun 15 14:55:56 2012 -0700

    timezone and field assignment changes in Infinite CDR format, #17888

diff --git a/FS/FS/cdr/infinite.pm b/FS/FS/cdr/infinite.pm
index 90560c8..02ff9df 100644
--- a/FS/FS/cdr/infinite.pm
+++ b/FS/FS/cdr/infinite.pm
@@ -6,6 +6,8 @@ use FS::cdr qw(_cdr_date_parser_maker);
 
 @ISA = qw(FS::cdr);
 
+my $date_parser = _cdr_date_parser_maker('startdate');
+
 %info = (
   'name'          => 'Infinite Conferencing',
   'weight'        => 520,
@@ -13,26 +15,38 @@ use FS::cdr qw(_cdr_date_parser_maker);
   'type'          => 'csv',
   'sep_char'      => ',',
   'import_fields' => [
-    'uniqueid',       # billid
-    skip(3),          # confid, invoicenum, acctgrpid
-    'accountcode',    # accountid ("Room Confirmation Number")
-    skip(2),          # billingcode ("Room Billingcode"), confname
-    skip(1),          # participant_type
-    'startdate',      # starttime_t
-    skip(2),          # startdate, starttime
+    'uniqueid',       # A. billid
+    skip(3),          # B-D. confid, invoicenum, acctgrpid
+    skip(1),          # E. accountid ("Room Confirmation Number")
+    skip(2),          # F-G. billingcode ("Room Billingcode"), confname
+    skip(1),          # H. participant_type
+    skip(1),          # I. starttime_t - timezone is unreliable
+    sub {             # J. startdate
+      my ($cdr, $data, $conf, $param) = @_;
+      $param->{'date_part'} = $data; # stash this and combine with the time
+      '';
+    },
+    sub {             # K. starttime
+      my ($cdr, $data, $conf, $param) = @_;
+      my $datestring = delete($param->{'date_part'}) . ' ' . $data;
+      &{ $date_parser }($cdr, $datestring);
+    },
     sub { my($cdr, $data, $conf, $param) = @_;
           $cdr->duration($data * 60);
           $cdr->billsec( $data * 60);
-    },                # minutes
-    'dst',            # dnis
-    'src',            # ani
-    skip(8),          # calltype, calltype_text, confstart_t, confstartdate,
+    },                # L. minutes
+    skip(1),          # M. dnis
+    'src',            # N. ani
+    'dst',            # O. calltype
+    skip(7),          # P-V. calltype_text, confstart_t, confstartdate, 
                       # confstarttime, confminutes, conflegs, ppm
-    'upstream_price', # callcost
-    skip(13),         # confcost, rppm, rcallcost, rconfcost,
-                      # auxdata[1..4], ldval, sysname, username, cec, pec
-    'userfield',      # unnamed field
-    ],
+    'upstream_price', # W. callcost
+    skip(11),         # X-AH. confcost, rppm, rcallcost, rconfcost,
+                      # auxdata[1..4], ldval, sysname, username
+    'accountcode',    # AI. Chairperson Entry Code
+    skip(1),          # AJ. Participant Entry Code
+    'description',    # AK. contact name
+  ],
 
 );
 

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

Summary of changes:
 FS/FS/cdr/infinite.pm |   46 ++++++++++++++++++++++++++++++----------------
 1 files changed, 30 insertions(+), 16 deletions(-)




More information about the freeside-commits mailing list