[freeside-commits] branch FREESIDE_3_BRANCH updated. 672c4452d590bc853f21f016b291496651156c8b

Mark Wells mark at 420.am
Tue May 12 20:51:26 PDT 2015


The branch, FREESIDE_3_BRANCH has been updated
       via  672c4452d590bc853f21f016b291496651156c8b (commit)
      from  1feb4dcca56c44429f7b1ea74a0431ca51185082 (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 672c4452d590bc853f21f016b291496651156c8b
Author: Mark Wells <mark at freeside.biz>
Date:   Tue May 12 17:16:08 2015 -0700

    PBXware CDRs: strip trailing non-numeric stuff from src/dst numbers, #34575

diff --git a/FS/FS/part_export/pbxware.pm b/FS/FS/part_export/pbxware.pm
index 3da4c2a..36b1a2a 100644
--- a/FS/FS/part_export/pbxware.pm
+++ b/FS/FS/part_export/pbxware.pm
@@ -140,6 +140,11 @@ sub import_cdrs {
         uniqueid    => $uniqueid,
       );
       @hash{@names} = @$row;
+      # strip non-numeric junk that sometimes gets appended to these (it 
+      # causes problems creating Freeside detail records)
+      foreach (qw(src dst)) {
+        $hash{$_} =~ s/\D*$//;
+      }
 
       my $cdr = FS::cdr->new(\%hash);
       $error = $cdr->insert;

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

Summary of changes:
 FS/FS/part_export/pbxware.pm |    5 +++++
 1 file changed, 5 insertions(+)




More information about the freeside-commits mailing list