[freeside-commits] branch FREESIDE_3_BRANCH updated. 9c423ca4410eb737d3c37c52265b4b361593a210
Jeremy Davis
jeremyd at 420.am
Wed Feb 12 09:09:33 PST 2014
The branch, FREESIDE_3_BRANCH has been updated
via 9c423ca4410eb737d3c37c52265b4b361593a210 (commit)
from c0247b9f767b19264c7888295e3784ebc37ef6b7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9c423ca4410eb737d3c37c52265b4b361593a210
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Feb 5 13:51:54 2014 -0800
add "Basic with upstream destination name" CDR display format, RT#20129
diff --git a/FS/FS/cdr.pm b/FS/FS/cdr.pm
index 80b31bf..0fdcbdf 100644
--- a/FS/FS/cdr.pm
+++ b/FS/FS/cdr.pm
@@ -1151,6 +1151,8 @@ sub calltypename {
=cut
+# in the future, load this dynamically from detail_format classes
+
my %export_names = (
'simple' => {
'name' => 'Simple',
@@ -1169,6 +1171,10 @@ my %export_names = (
'name' => 'Basic',
'invoice_header' => "Date/Time,Called Number,Min/Sec,Price",
},
+ 'basic_upstream_dst_regionname' => {
+ 'name' => 'Basic with upstream destination name',
+ 'invoice_header' => "Date/Time,Called Number,Destination,Min/Sec,Price",
+ },
'default' => {
'name' => 'Default',
'invoice_header' => 'Date,Time,Number,Destination,Duration,Price',
diff --git a/FS/FS/detail_format/basic_upstream_dst_regionname.pm b/FS/FS/detail_format/basic_upstream_dst_regionname.pm
new file mode 100644
index 0000000..258fd90
--- /dev/null
+++ b/FS/FS/detail_format/basic_upstream_dst_regionname.pm
@@ -0,0 +1,22 @@
+package FS::detail_format::basic_upstream_dst_regionname;
+
+use strict;
+use base qw(FS::detail_format);
+
+sub name { 'Basic with upstream destination name' }
+
+sub header_detail { 'Date/Time,Called Number,Destination,Min/Sec,Price' }
+
+sub columns {
+ my $self = shift;
+ my $cdr = shift;
+ (
+ $self->time2str_local('%d %b - %I:%M %p', $cdr->startdate),
+ $cdr->dst,
+ $cdr->upstream_dst_regionname,
+ $self->duration($cdr),
+ $self->price($cdr),
+ )
+}
+
+1;
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cdr.pm | 6 ++++++
.../{basic.pm => basic_upstream_dst_regionname.pm} | 7 ++++---
2 files changed, 10 insertions(+), 3 deletions(-)
copy FS/FS/detail_format/{basic.pm => basic_upstream_dst_regionname.pm} (52%)
More information about the freeside-commits
mailing list