summaryrefslogtreecommitdiff
path: root/FS/FS/detail_format/simple2.pm
blob: 5bba18d4d140f7fded4532992b3f0ad14123db45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package FS::detail_format::simple2;

use strict;
use parent qw(FS::detail_format);
use Date::Format qw(time2str);

sub name { 'Simple with source' }

sub header_detail { 'Date,Time,Name,Called From,Destination,Duration,Price' }

sub columns {
  my $self = shift;
  my $cdr = shift;
  (
    time2str($self->date_format, $cdr->startdate),
    time2str('%r', $cdr->startdate),
    $cdr->userfield,
    $cdr->src,
    $cdr->dst,
    $self->duration($cdr),
    $self->price($cdr),
  )
}

1;