[freeside-commits] branch master updated. 1d050e512416494a9f3efe232ec19ccf18b7b9af

Ivan ivan at 420.am
Mon Jun 30 17:09:46 PDT 2014


The branch, master has been updated
       via  1d050e512416494a9f3efe232ec19ccf18b7b9af (commit)
      from  5ef2dadffa97bd4d98883e21dda3caa072c0b833 (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 1d050e512416494a9f3efe232ec19ccf18b7b9af
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Jun 30 17:09:45 2014 -0700

    use a separate table for freesidestatus for IVR imports, RT#39055

diff --git a/FS/FS/cdr/Import.pm b/FS/FS/cdr/Import.pm
index e788712..ca6ae93 100644
--- a/FS/FS/cdr/Import.pm
+++ b/FS/FS/cdr/Import.pm
@@ -117,13 +117,16 @@ sub dbi_import {
 
     $cdr->cdrtypenum($opt{c}) if $opt{c};
 
-    #print $row->{$pkey},"\n" if $opt{v};
+    my $pkey_value = $args{status_table} ? $row->{"$table.$pkey"}
+                                         : $row->{$pkey};
+
+    #print "$pkey_value\n" if $opt{v};
     my $error = $cdr->insert;
 
     if ($error) {
 
-      #die $row->{$pkey} . ": failed import: $error\n";
-      print $row->{$pkey} . ": failed import: $error\n";
+      #die "$pkey_value: failed import: $error\n";
+      print "$pkey_value: failed import: $error\n";
 
     } else {
 
@@ -142,7 +145,7 @@ sub dbi_import {
 
       }
 
-      my $updated = $dbi->do($st_sql, undef, $row->{$pkey} );
+      my $updated = $dbi->do($st_sql, undef, $pkey_value );
       #$updates += $updated;
       die "failed to set status: ".$dbi->errstr."\n" unless $updated;
 

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

Summary of changes:
 FS/FS/cdr/Import.pm |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list