diff options
author | mark <mark> | 2012-01-03 21:13:33 +0000 |
---|---|---|
committer | mark <mark> | 2012-01-03 21:13:33 +0000 |
commit | 0d16979c948a691c95ef92f4ac7a2921a9e8c998 (patch) | |
tree | fca3c5c23008380183c4ffa566525d95fb2bc820 /FS/FS/detail_format/accountcode_default.pm | |
parent | c9c9f28394024d03f78c61b37811e4816aa73c9a (diff) |
detail format refactor, #15535
Diffstat (limited to 'FS/FS/detail_format/accountcode_default.pm')
-rw-r--r-- | FS/FS/detail_format/accountcode_default.pm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/FS/FS/detail_format/accountcode_default.pm b/FS/FS/detail_format/accountcode_default.pm new file mode 100644 index 0000000..031cc4b --- /dev/null +++ b/FS/FS/detail_format/accountcode_default.pm @@ -0,0 +1,25 @@ +package FS::detail_format::accountcode_default; + +use strict; +use parent 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; |