From: Mark Wells Date: Tue, 27 Aug 2013 21:16:36 +0000 (-0700) Subject: fix for flat-rate prefix rating, #24716, from #5738 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=267020ff22d48bb82a02a13525f0e0844ef4d6bd fix for flat-rate prefix rating, #24716, from #5738 --- diff --git a/FS/FS/cdr.pm b/FS/FS/cdr.pm index 3ebe6c420..de9cf124a 100644 --- a/FS/FS/cdr.pm +++ b/FS/FS/cdr.pm @@ -932,8 +932,12 @@ sub rate_prefix { } #should preserve (display?) this - my $charge_min = ( $charge_sec - $conn_seconds ) / 60; - $charge += ($rate_detail->min_charge * $charge_min) if $charge_min > 0; #still not rounded + if ( $granularity == 0 ) { # per call rate + $charge += $rate_detail->min_charge; + } else { + my $charge_min = ( $charge_sec - $conn_seconds ) / 60; + $charge += ($rate_detail->min_charge * $charge_min) if $charge_min > 0; #still not rounded + } }