"use base" for compatibility
[freeside.git] / FS / FS / detail_format / simple2.pm
1 package FS::detail_format::simple2;
2
3 use strict;
4 use base qw(FS::detail_format);
5 use Date::Format qw(time2str);
6
7 sub name { 'Simple with source' }
8
9 sub header_detail { 'Date,Time,Name,Called From,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->userfield,
18     $cdr->src,
19     $cdr->dst,
20     $self->duration($cdr),
21     $self->price($cdr),
22   )
23 }
24
25 1;