[freeside-commits] freeside/FS/FS/part_pkg voip_cdr.pm, 1.116, 1.117
Erik Levinson
levinse at wavetail.420.am
Tue Apr 12 17:35:45 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv6731/FS/FS/part_pkg
Modified Files:
voip_cdr.pm
Log Message:
fix region group billing, RT8951
Index: voip_cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_cdr.pm,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -w -d -r1.116 -r1.117
--- voip_cdr.pm 8 Apr 2011 01:00:37 -0000 1.116
+++ voip_cdr.pm 13 Apr 2011 00:35:43 -0000 1.117
@@ -681,16 +681,21 @@
$seconds += $charge_sec;
- $region_group_included_min -= $minutes if $region_group;
+ $region_group_included_min -= $minutes
+ if $region_group && $rate_detail->region_group;
$included_min{$regionnum}{$ratetimenum} -= $minutes;
- if ( $region_group_included_min <= 0
+ if ( ($region_group_included_min <= 0 || !$rate_detail->region_group)
&& $included_min{$regionnum}{$ratetimenum} <= 0 ) {
my $charge_min = 0 - $included_min{$regionnum}{$ratetimenum}; #XXX should preserve
#(display?) this
$included_min{$regionnum}{$ratetimenum} = 0;
$charge += ($rate_detail->min_charge * $charge_min); #still not rounded
}
+ elsif( $region_group_included_min > 0 && $region_group
+ && $rate_detail->region_group ) {
+ $included_min{$regionnum}{$ratetimenum} = 0
+ }
# choose next rate_detail
$rate_detail = $rate->dest_detail({ 'countrycode' => $countrycode,
More information about the freeside-commits
mailing list