33abb092fc572b030c68f2a4786f48ea8d0485b6
[freeside.git] / FS / FS / detail_format / default.pm
1 package FS::detail_format::default;
2
3 use strict;
4 use parent qw(FS::detail_format);
5 use Date::Format qw(time2str);
6
7 sub name { 'Default' }
8
9 sub header_detail { 'Date,Time,Number,Destination,Duration,Price' }
10
11 sub columns {
12   my $self = shift;
13   my $cdr = shift;
14   (
15     time2str($self->date_format, $cdr->startdate),
16     time2str('%r', $cdr->startdate),
17     ($cdr->rated_pretty_dst || $cdr->dst),
18     $cdr->rated_regionname,
19     $self->duration($cdr),
20     $self->price($cdr),
21   )
22 }
23
24 1;