summaryrefslogtreecommitdiff
path: root/FS/FS/cdr.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2012-03-08 20:30:02 -0800
committerMark Wells <mark@freeside.biz>2012-03-08 20:30:02 -0800
commit984fff08c579ff72f6eb7f658d9373079eafb16a (patch)
tree7652101bc01162e6d4fea5482767d22309bfb225 /FS/FS/cdr.pm
parent440a4fe4f826a59a660d744889b24eb751da675b (diff)
"simple with accountcode" CDR format, #16348
Diffstat (limited to 'FS/FS/cdr.pm')
-rw-r--r--FS/FS/cdr.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/FS/FS/cdr.pm b/FS/FS/cdr.pm
index 9b70719..1769fe9 100644
--- a/FS/FS/cdr.pm
+++ b/FS/FS/cdr.pm
@@ -1017,6 +1017,10 @@ my %export_names = (
'invoice_header' => "Date,Time,Called From,Destination,Duration,Price",
#"Date,Time,Name,Called From,Destination,Duration,Price",
},
+ 'accountcode_simple' => {
+ 'name' => 'Simple with accountcode',
+ 'invoice_header' => "Date,Time,Called From,Account,Duration,Price",
+ },
'basic' => {
'name' => 'Basic',
'invoice_header' => "Date/Time,Called Number,Min/Sec,Price",
@@ -1114,6 +1118,14 @@ sub export_formats {
#sub { sprintf('%.3f', shift->upstream_price ) }, #PRICE
$price_sub,
],
+ 'accountcode_simple' => [
+ sub { time2str($date_format, shift->calldate_unix ) }, #DATE
+ sub { time2str('%r', shift->calldate_unix ) }, #TIME
+ 'src', #called from
+ 'accountcode', #NUMBER_DIALED
+ $duration_sub, #DURATION
+ $price_sub,
+ ],
'sum_duration' => [
# for summary formats, the CDR is a fictitious object containing the
# total billsec and the phone number of the service