legacy invoices via self-service, RT#13656
[freeside.git] / FS / FS / cdr / infinite.pm
1 package FS::cdr::infinite;
2
3 use strict;
4 use vars qw( @ISA %info );
5 use FS::cdr qw(_cdr_date_parser_maker);
6
7 @ISA = qw(FS::cdr);
8
9 %info = (
10   'name'          => 'Infinite Conferencing',
11   'weight'        => 520,
12   'header'        => 1,
13   'type'          => 'csv',
14   'sep_char'      => ',',
15   'import_fields' => [
16     'uniqueid',       # billid
17     skip(3),          # confid, invoicenum, acctgrpid
18     'accountcode',    # accountid ("Room Confirmation Number")
19     skip(2),          # billingcode ("Room Billingcode"), confname
20     skip(1),          # participant_type
21     'startdate',      # starttime_t
22     skip(2),          # startdate, starttime
23     sub { my($cdr, $data, $conf, $param) = @_;
24           $cdr->duration($data * 60);
25           $cdr->billsec( $data * 60);
26     },                # minutes
27     'dst',            # dnis
28     'src',            # ani
29     skip(8),          # calltype, calltype_text, confstart_t, confstartdate,
30                       # confstarttime, confminutes, conflegs, ppm
31     'upstream_price', # callcost
32     skip(13),         # confcost, rppm, rcallcost, rconfcost,
33                       # auxdata[1..4], ldval, sysname, username, cec, pec
34     'userfield',      # unnamed field
35     ],
36
37 );
38
39 sub skip { map {''} (1..$_[0]) }
40
41 1;