[freeside-commits] freeside/FS/FS Record.pm, 1.176, 1.177 cdr.pm, 1.28, 1.29
Ivan,,,
ivan at wavetail.420.am
Fri Jan 2 17:53:01 PST 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv32674/FS/FS
Modified Files:
Record.pm cdr.pm
Log Message:
indosoft CDR format, RT#4425
Index: cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cdr.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- cdr.pm 2 Jan 2009 22:03:57 -0000 1.28
+++ cdr.pm 3 Jan 2009 01:52:59 -0000 1.29
@@ -634,11 +634,12 @@
sub _cdr_date_parser_maker {
my $field = shift;
+ my @fields = ref($field) ? @$field : ($field);
return sub {
- my( $cdr, $date ) = @_;
- #$cdr->$field( _cdr_date_parse($date) );
- eval { $cdr->$field( _cdr_date_parse($date) ); };
- die "error parsing date for $field from $date: $@\n" if $@;
+ my( $cdr, $datestring ) = @_;
+ my $unixdate = eval { _cdr_date_parse($datestring) };
+ die "error parsing date for @fields from $datestring: $@\n" if $@;
+ $cdr->$_($unixdate) foreach @fields;
};
}
@@ -674,13 +675,22 @@
=item file
+Filename
+
=item format
+=item params
+
+Hash reference of preset fields, typically cdrbatch
+
+=item empty_ok
+
+Set true to prevent throwing an error on empty imports
+
=back
=cut
-
my %import_options = (
'table' => 'cdr',
Index: Record.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Record.pm,v
retrieving revision 1.176
retrieving revision 1.177
diff -u -d -r1.176 -r1.177
--- Record.pm 2 Jan 2009 22:03:57 -0000 1.176
+++ Record.pm 3 Jan 2009 01:52:59 -0000 1.177
@@ -1505,7 +1505,7 @@
my $job = $param->{job};
my $file = $param->{file};
my $format = $param->{'format'};
- my $params = $param->{params};
+ my $params = $param->{params} || {};
die "unknown format $format" unless exists $formats->{ $format };
More information about the freeside-commits
mailing list