fix cancellation errors with updated flat_introrate, RT#5865
[freeside.git] / FS / FS / part_pkg / cdr_termination.pm
index 1510337..d99903d 100644 (file)
@@ -81,10 +81,9 @@ tie my %temporalities, 'Tie::IxHash',
                         },
 
   },
-
+                       #cdr_column
   'fieldorder' => [qw(
                        setup_fee recur_fee
-                       cdr_column
                        recur_temporality unused_credit recur_method cutoff_day
                        output_format usage_section summarize_usage
                      )
@@ -165,7 +164,9 @@ sub calc_recur {
 
     #add a cdr_termination record and the charges
 
-    my $term_price = sprintf('%.2f', $cdr->rated_price * $term_percent / 100 );
+    # XXX config?
+    #my $term_price = sprintf('%.2f', $cdr->rated_price * $term_percent / 100 );
+    my $term_price = sprintf('%.4f', $cdr->rated_price * $term_percent / 100 );
 
     my $cdr_termination = new FS::cdr_termination {
       'acctid'      => $cdr->acctid,