[freeside-commits] branch FREESIDE_3_BRANCH updated. bc977024d700876278824d2556c8d6201ad71334

Jeremy Davis jeremyd at 420.am
Tue Feb 16 14:24:45 PST 2016


The branch, FREESIDE_3_BRANCH has been updated
       via  bc977024d700876278824d2556c8d6201ad71334 (commit)
      from  f309b1a0e59d9fa1213b73f2add971f39809c0d3 (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 bc977024d700876278824d2556c8d6201ad71334
Author: Jeremy Davis <jeremyd at freeside.biz>
Date:   Tue Feb 16 05:52:42 2016 -0500

    Revert changes on #36503

diff --git a/FS/FS/cdr/amcom.pm b/FS/FS/cdr/amcom.pm
index 697a682..4fb94ee 100644
--- a/FS/FS/cdr/amcom.pm
+++ b/FS/FS/cdr/amcom.pm
@@ -2,9 +2,9 @@ package FS::cdr::amcom;
 
 use strict;
 use base qw( FS::cdr );
-use vars qw( %info %cdrtypes);
+use vars qw( %info );
 use DateTime;
-use FS::Record qw( qsearch );
+use FS::Record qw( qsearchs );
 use FS::cdr_type;
 
 my ($tmp_mday, $tmp_mon, $tmp_year);
@@ -16,12 +16,6 @@ my ($tmp_mday, $tmp_mon, $tmp_year);
   'type'          => 'csv',
   'sep_char'      => ',',
   'disabled'      => 0,
-  'header_buffer' => sub {
-
-	%cdrtypes = ( map { $_->cdrtypename => $_->cdrtypenum }
-                             qsearch('cdr_type', {})
-            );
-    },
 
   #listref of what to do with each field from the CDR, in order
   'import_fields' => [
@@ -43,7 +37,9 @@ my ($tmp_mday, $tmp_mon, $tmp_year);
     sub {	   # 5. Call Category (LOCAL, NATIONAL, FREECALL, MOBILE)
       my ($cdr, $data) = @_;
       $data ||= 'none';
-      $cdr->cdrtypenum($cdrtypes{$data} || '');
+
+      my $cdr_type = qsearchs('cdr_type', { 'cdrtypename' => $data } );
+      $cdr->set('cdrtypenum', $cdr_type->cdrtypenum) if $cdr_type;      
       $cdr->set('dcontext', $data);  
     },
     sub {         # 6. Start Date (DDMMYYYY

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

Summary of changes:
 FS/FS/cdr/amcom.pm |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)




More information about the freeside-commits mailing list