diff options
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/Schema.pm | 4 | ||||
| -rw-r--r-- | FS/FS/cdr.pm | 7 | 
2 files changed, 9 insertions, 2 deletions
| diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 2043b45ec..94a56248b 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -1921,10 +1921,12 @@ sub tables_hashref {          #NULL, done (or something)          'freesidestatus', 'varchar',   'NULL',     32,   '', '',  +        'cdrbatch', 'varchar', 'NULL', $char_d, '', '', +        ],        'primary_key' => 'acctid',        'unique' => [], -      'index' => [ [ 'calldate' ], [ 'dst' ], [ 'accountcode' ], [ 'freesidestatus' ] ], +      'index' => [ [ 'calldate' ], [ 'dst' ], [ 'accountcode' ], [ 'freesidestatus' ], [ 'cdrbatch' ], ],      },      'cdr_calltype' => { diff --git a/FS/FS/cdr.pm b/FS/FS/cdr.pm index 439d5ae69..8b09e4ec4 100644 --- a/FS/FS/cdr.pm +++ b/FS/FS/cdr.pm @@ -129,6 +129,8 @@ following fields are currently supported:  =item freesidestatus - NULL, done (or something) +=item cdrbatch +  =back  =head1 METHODS @@ -617,6 +619,7 @@ sub batch_import {    my $fh = $param->{filehandle};    my $format = $param->{format}; +  my $cdrbatch = $param->{cdrbatch};    return "Unknown format $format"      unless exists( $cdr_info{$format} ) @@ -699,6 +702,8 @@ sub batch_import {        }        @{ $info->{'import_fields'} }      ; +  +    $cdr{cdrbatch} = $cdrbatch;      my $cdr = new FS::cdr ( \%cdr ); @@ -732,7 +737,7 @@ sub batch_import {    $dbh->commit or die $dbh->errstr if $oldAutoCommit;    #might want to disable this if we skip records for any reason... -  return "Empty file!" unless $imported; +  return "Empty file!" unless $imported || $param->{empty_ok};    ''; | 
