summaryrefslogtreecommitdiff
path: root/FS/FS/detail_format/accountcode_default.pm
diff options
context:
space:
mode:
authormark <mark>2012-01-03 21:13:33 +0000
committermark <mark>2012-01-03 21:13:33 +0000
commit0d16979c948a691c95ef92f4ac7a2921a9e8c998 (patch)
treefca3c5c23008380183c4ffa566525d95fb2bc820 /FS/FS/detail_format/accountcode_default.pm
parentc9c9f28394024d03f78c61b37811e4816aa73c9a (diff)
detail format refactor, #15535
Diffstat (limited to 'FS/FS/detail_format/accountcode_default.pm')
-rw-r--r--FS/FS/detail_format/accountcode_default.pm25
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;