backup the schema for tables we don't need the data from. RT#85959
[freeside.git] / FS / FS / part_pkg / voip_tiered.pm
index d8d74c1..d8607a6 100644 (file)
@@ -81,6 +81,7 @@ sub calc_usage {
     && ( $last_bill eq '' || $last_bill == 0 );
 
   my $included_min    = $self->option('min_included', 1) || 0;
+  $included_min *= ($cust_pkg->quantity || 1);
   my $cdr_svc_method  = $self->option('cdr_svc_method',1)||'svc_phone.phonenum';
   my $cdr_inout       = ($cdr_svc_method eq 'svc_phone.phonenum')
                           && $self->option('cdr_inout',1)
@@ -195,7 +196,10 @@ sub calc_usage {
 
   my $output_format = $self->option('output_format', 'Hush!') || 'default';
 
-  my $formatter = FS::detail_format->new($output_format, buffer => $details);
+  my $formatter = FS::detail_format->new($output_format,
+    buffer => $details,
+    rounding => ($self->option_cacheable('rounding') || 2))
+  ;
 
   my $charges = 0;