Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / FS / FS / cdr.pm
index e127e8b..9d72c39 100644 (file)
@@ -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
+      }
 
     }