Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / FS / FS / detail_format / sum_duration_prefix.pm
index 19b6648..0459041 100644 (file)
@@ -47,7 +47,8 @@ sub append {
     #         "' in CDR #".$cdr->acctid."\n";
     $subtotal->{count}++;
     $subtotal->{duration} += $object->rated_seconds;
-    $subtotal->{amount} += $object->rated_price;
+    $subtotal->{amount} += $object->rated_price
+      if $object->freesidestatus ne 'no-charge';
   }
 }
 
@@ -70,7 +71,7 @@ sub finish {
       $prefix,
       map({ 
           $_->{count},
-          (int($_->{duration}/60) . ' min'),
+          sprintf('%.01f min', $_->{duration}/60),
         } @subtotals ),
       $self->money_char . sprintf('%.02f',$total_amount),
     );