fix bug affecting single_price calculation
authormark <mark>
Thu, 26 Aug 2010 21:10:25 +0000 (21:10 +0000)
committermark <mark>
Thu, 26 Aug 2010 21:10:25 +0000 (21:10 +0000)
FS/FS/part_pkg/voip_cdr.pm

index 984a650..5fc1fb8 100644 (file)
@@ -699,6 +699,8 @@ sub calc_usage {
 
           $classnum = $rate_detail->classnum;
           $charge = sprintf('%.2f', $charge);
+          warn "Incrementing \$charges by $charge.  Now $charges\n" if $DEBUG;
+          $charges += $charge;
 
           @call_details = (
             $cdr->downstream_csv( 'format'         => $output_format,
@@ -718,8 +720,6 @@ sub calc_usage {
 
         if ( $charge > 0 ) {
           #just use FS::cust_bill_pkg_detail objects?
-          warn "Incrementing \$charges by $charge.  Now $charges\n" if $DEBUG;
-          $charges += $charge;
           my $call_details;
           my $phonenum = $cust_svc->svc_x->phonenum;