summaryrefslogtreecommitdiff
path: root/FS/FS/detail_format/simple2.pm
blob: d57114171d97b926a2ac9a1336491f811634f7fd (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
package FS::detail_format::simple2;

use strict;
use base qw(FS::detail_format);

sub name { 'Simple with source' }

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

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

1;