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

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

sub name { 'Default with accountcode' }

sub header_detail { 'Date,Time,Account,Number,Destination,Duration,Price' }

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

1;