backup the schema for tables we don't need the data from. RT#85959
[freeside.git] / FS / FS / cdr / sonus.pm
1 package FS::cdr::sonus;
2
3 use strict;
4 use base qw( FS::cdr );
5 use vars qw( %info );
6 use FS::cdr qw( _cdr_date_parser_maker _cdr_min_parser_maker );
7
8 %info = (
9   'name'          => 'Sonus',
10   'weight'        => 525,
11   'header'        => 0,     #0 default, set to 1 to ignore the first line, or
12                             # to higher numbers to ignore that number of lines
13   'type'          => 'csv',
14   'sep_char'      => ',',   #for csv, defaults to ,
15   'import_fields' => [
16     'src', # also customer id
17     'dst',
18     _cdr_date_parser_maker('startdate'),
19     _cdr_date_parser_maker('enddate'),
20     _cdr_min_parser_maker,
21     skip(12),
22     sub { #rate
23       my ($cdr, $rate) = @_;
24       $cdr->upstream_price(sprintf("%.4f", $rate * $cdr->duration / 60));
25     }
26   ],
27 );
28
29 sub skip { map {''} (1..$_[0]) }
30
31 1;