fix prorate_day without force_prorate_day for recur_Common packages configured as...
[freeside.git] / FS / FS / cdr / ispphone.pm
1 package FS::cdr::ispphone;
2
3 use strict;
4 use vars qw( @ISA %info $tmp_mon $tmp_mday $tmp_year );
5 use Time::Local;
6 use FS::cdr qw ( _cdr_date_parser_maker );
7 use Date::Parse;
8
9 @ISA = qw(FS::cdr);
10
11 %info = (
12   'name'          => 'ISPPhone',
13   'weight'        => 123,
14   'header'        => 1,
15   'import_fields' => [
16
17                  'accountcode',  # Accountcode
18                         sub { my ($cdr, $src) = @_;
19                                 $src =~ s/^\s+//;
20                                 $cdr->set('src', $src);
21
22                         },       # Form
23                         sub { my ($cdr, $dst) = @_;
24                                 $dst =~ s/^\s+//;
25                                 $cdr->set('dst', $dst);
26
27                         },       # To
28                        skip(1),  # Country
29      'upstream_dst_regionname',  # Description
30 _cdr_date_parser_maker('startdate'),  #DateTime
31
32                         sub { my ($cdr, $duration) = @_;
33                                 my ($min,$sec) = split(/:/, $duration);
34                                 my $billsec = $sec + $min * 60;
35                                 $cdr->set('billsec', $billsec);
36
37                         },       #Charged time, min:sec
38
39               'upstream_price',  # Amount ( upstream price )
40 ],
41
42 );
43
44 sub skip { map {''} (1..$_[0]) }
45
46 1;
47