projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0a02d33
)
don't use decimal minutes in call detail format
author
mark
<mark>
Mon, 27 Sep 2010 22:59:47 +0000
(22:59 +0000)
committer
mark
<mark>
Mon, 27 Sep 2010 22:59:47 +0000
(22:59 +0000)
FS/FS/cdr.pm
patch
|
blob
|
history
FS/FS/part_pkg/voip_cdr.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cdr.pm
b/FS/FS/cdr.pm
index
2406557
..
002e2d2
100644
(file)
--- a/
FS/FS/cdr.pm
+++ b/
FS/FS/cdr.pm
@@
-560,11
+560,7
@@
sub export_formats {
elsif ( $opt{granularity} == 60 ) {#full minutes
return sprintf("%.0fm",$sec/60);
}
elsif ( $opt{granularity} == 60 ) {#full minutes
return sprintf("%.0fm",$sec/60);
}
- elsif ( $opt{granularity} == 6 ||
- $opt{granularity} == 30 ) {#tenths or halves
- return sprintf("%.01fm",$sec/60);
- }
- else { #seconds, or unspecified
+ else { #anything else
return sprintf("%dm %ds", $sec/60, $sec%60);
}
};
return sprintf("%dm %ds", $sec/60, $sec%60);
}
};
diff --git
a/FS/FS/part_pkg/voip_cdr.pm
b/FS/FS/part_pkg/voip_cdr.pm
index
e067af5
..
8294bed
100644
(file)
--- a/
FS/FS/part_pkg/voip_cdr.pm
+++ b/
FS/FS/part_pkg/voip_cdr.pm
@@
-561,7
+561,9
@@
sub calc_usage {
@call_details = ($cdr->downstream_csv( 'format' => $output_format,
'charge' => $charge,
@call_details = ($cdr->downstream_csv( 'format' => $output_format,
'charge' => $charge,
- 'seconds' => $seconds,
+ 'seconds' => ($use_duration ?
+ $cdr->duration :
+ $cdr->billsec),
'granularity' => $granularity,
)
);
'granularity' => $granularity,
)
);
@@
-685,7
+687,9
@@
sub calc_usage {
@call_details = (
$cdr->downstream_csv( 'format' => $output_format,
'granularity' => $rate_detail->sec_granularity,
@call_details = (
$cdr->downstream_csv( 'format' => $output_format,
'granularity' => $rate_detail->sec_granularity,
- 'seconds' => $seconds,
+ 'seconds' => ($use_duration ?
+ $cdr->duration :
+ $cdr->billsec),
'charge' => $charge,
'pretty_dst' => $pretty_destnum,
'dst_regionname' => $regionname,
'charge' => $charge,
'pretty_dst' => $pretty_destnum,
'dst_regionname' => $regionname,