[freeside-commits] freeside/FS/FS/part_pkg voip_cdr.pm,1.19,1.20
Jeff Finucane,420,,
jeff at wavetail.420.am
Fri Aug 1 21:20:21 PDT 2008
- Previous message: [freeside-commits] freeside/FS/FS Conf.pm, 1.236, 1.237 Schema.pm, 1.94, 1.95 cust_bill.pm, 1.219, 1.220 cust_bill_pkg.pm, 1.19, 1.20 cust_main.pm, 1.354, 1.355
- Next message: [freeside-commits] freeside/conf invoice_html, 1.23, 1.24 invoice_latex, 1.25, 1.26
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv24574/FS/FS/part_pkg
Modified Files:
voip_cdr.pm
Log Message:
bundled package presentation improvements
Index: voip_cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_cdr.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- voip_cdr.pm 2 Aug 2008 04:10:01 -0000 1.19
+++ voip_cdr.pm 2 Aug 2008 04:20:17 -0000 1.20
@@ -158,6 +158,10 @@
my $output_format = $self->option('output_format', 'Hush!')
|| 'simple';
+ eval "use Text::CSV_XS;";
+ die $@ if $@;
+ my $csv = new Text::CSV_XS;
+
foreach my $cust_svc (
grep { $_->part_svc->svcdb eq 'svc_phone' } $cust_pkg->cust_svc
) {
@@ -298,7 +302,7 @@
$charge = sprintf('%.2f', $cdr->upstream_price);
$charges += $charge;
-
+
@call_details = (
#time2str("%Y %b %d - %r", $cdr->calldate_unix ),
time2str("%c", $cdr->calldate_unix), #XXX this should probably be a config option dropdown so they can select US vs- rest of world dates or whatnot
@@ -383,10 +387,9 @@
if ( $self->option('rating_method') eq 'upstream_simple' ) {
$call_details = [ 'C', $call_details[0] ];
}else{
- $call_details = join(' - ', @call_details );
+ $csv->combine(@call_details);
+ $call_details = [ 'C', $csv->string ];
}
- warn " adding details on charge to invoice: $call_details"
- if ( $DEBUG && !ref($call_details) );
warn " adding details on charge to invoice: [ ".
join(', ', @{$call_details} ). " ]"
if ( $DEBUG && ref($call_details) );
@@ -476,7 +479,7 @@
'quantity' => $cust_pkg->quantity,
'sdate' => $$sdate,
'edate' => $cust_pkg->bill, # already fiddled
- 'itemdesc' => 'Call details', # configurable?
+ 'itemdesc' => 'Usage charges', # configurable?
'details' => \@details,
};
- Previous message: [freeside-commits] freeside/FS/FS Conf.pm, 1.236, 1.237 Schema.pm, 1.94, 1.95 cust_bill.pm, 1.219, 1.220 cust_bill_pkg.pm, 1.19, 1.20 cust_main.pm, 1.354, 1.355
- Next message: [freeside-commits] freeside/conf invoice_html, 1.23, 1.24 invoice_latex, 1.25, 1.26
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list