X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fcdr_termination.pm;h=cfd6b4e714cb10be07257e955198ecf66418bf44;hb=ef405fedfb6095c153cc34166da0e15d40ad8bf7;hp=15103378e3559b6fe10e81caaf877c548a39b2f2;hpb=69678d308805f5ca4b171ea0c5ac1da957811aa0;p=freeside.git diff --git a/FS/FS/part_pkg/cdr_termination.pm b/FS/FS/part_pkg/cdr_termination.pm index 15103378e..cfd6b4e71 100644 --- a/FS/FS/part_pkg/cdr_termination.pm +++ b/FS/FS/part_pkg/cdr_termination.pm @@ -66,7 +66,7 @@ tie my %temporalities, 'Tie::IxHash', 'select_options' => \%FS::part_pkg::recur_Common::recur_method, }, - #false laziness w/cdr_termination.pm + #false laziness w/voip_cdr.pm 'output_format' => { 'name' => 'CDR invoice display format', 'type' => 'select', 'select_options' => { FS::cdr::invoice_formats() }, @@ -80,13 +80,17 @@ tie my %temporalities, 'Tie::IxHash', 'type' => 'checkbox', }, - }, + 'usage_mandate' => { 'name' => 'Always put usage details in separate section', + 'type' => 'checkbox', + }, + #eofalse + }, + #cdr_column 'fieldorder' => [qw( setup_fee recur_fee - cdr_column recur_temporality unused_credit recur_method cutoff_day - output_format usage_section summarize_usage + output_format usage_section summarize_usage usage_mandate ) ], @@ -165,7 +169,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,