[freeside-commits] branch FREESIDE_3_BRANCH updated. c3da661314440d758a492ef387b639742765720f

Mark Wells mark at 420.am
Tue Aug 27 14:17:38 PDT 2013


The branch, FREESIDE_3_BRANCH has been updated
       via  c3da661314440d758a492ef387b639742765720f (commit)
      from  2bc824c74bc16dc4cf22a4b9b296249e94c9be74 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c3da661314440d758a492ef387b639742765720f
Author: Mark Wells <mark at freeside.biz>
Date:   Tue Aug 27 14:16:06 2013 -0700

    fix for flat-rate prefix rating, #24716, from #5738

diff --git a/FS/FS/cdr.pm b/FS/FS/cdr.pm
index 3ebe6c4..de9cf12 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
+      }
 
     }
 

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cdr.pm |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list