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