[freeside-commits] freeside/FS/FS Record.pm,1.174,1.175
Ivan,,,
ivan at wavetail.420.am
Wed Dec 31 14:04:48 PST 2008
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv18094
Modified Files:
Record.pm
Log Message:
finish up working bell_west CDR format, RT#4403
Index: Record.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Record.pm,v
retrieving revision 1.174
retrieving revision 1.175
diff -u -d -r1.174 -r1.175
--- Record.pm 31 Dec 2008 03:28:55 -0000 1.174
+++ Record.pm 31 Dec 2008 22:04:45 -0000 1.175
@@ -1569,6 +1569,11 @@
eval "use Spreadsheet::ParseExcel;";
die $@ if $@;
+ eval "use DateTime::Format::Excel;";
+ #for now, just let the error be thrown if it is used, since only CDR
+ # formats bill_west and troop use it, not other excel-parsing things
+ #die $@ if $@;
+
my $excel = Spreadsheet::ParseExcel::Workbook->new->Parse($filename);
$parser = $excel->{Worksheet}[0]; #first sheet
@@ -1642,7 +1647,7 @@
#&{$field}(\%hash, $value);
push @later, $field, $value;
} else {
- $hash{$field} = $value if length($value);
+ $hash{$field} = $value if defined($value) && length($value);
}
}
@@ -1664,6 +1669,7 @@
return "can't insert record". ( $line ? " for $line" : '' ). ": $error";
}
+ $row++;
$imported++;
if ( $job && time - $min_sec > $last ) { #progress bar
More information about the freeside-commits
mailing list