projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This commit was manufactured by cvs2svn to create branch
[freeside.git]
/
FS
/
FS
/
part_pkg
/
cdr_termination.pm
diff --git
a/FS/FS/part_pkg/cdr_termination.pm
b/FS/FS/part_pkg/cdr_termination.pm
index
a073846
..
0666d79
100644
(file)
--- a/
FS/FS/part_pkg/cdr_termination.pm
+++ b/
FS/FS/part_pkg/cdr_termination.pm
@@
-58,6
+58,10
@@
tie my %temporalities, 'Tie::IxHash',
'subscription',
'default' => '1',
},
'subscription',
'default' => '1',
},
+ 'add_full_period'=> { 'name' => 'When prorating first month, also bill '.
+ 'for one full period after that',
+ 'type' => 'checkbox',
+ },
'recur_method' => { 'name' => 'Recurring fee method',
#'type' => 'radio',
'recur_method' => { 'name' => 'Recurring fee method',
#'type' => 'radio',
@@
-66,7
+70,7
@@
tie my %temporalities, 'Tie::IxHash',
'select_options' => \%FS::part_pkg::recur_Common::recur_method,
},
'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() },
'output_format' => { 'name' => 'CDR invoice display format',
'type' => 'select',
'select_options' => { FS::cdr::invoice_formats() },
@@
-80,12
+84,18
@@
tie my %temporalities, 'Tie::IxHash',
'type' => 'checkbox',
},
'type' => 'checkbox',
},
+ 'usage_mandate' => { 'name' => 'Always put usage details in separate section',
+ 'type' => 'checkbox',
+ },
+ #eofalse
+
},
#cdr_column
'fieldorder' => [qw(
setup_fee recur_fee
recur_temporality unused_credit recur_method cutoff_day
},
#cdr_column
'fieldorder' => [qw(
setup_fee recur_fee
recur_temporality unused_credit recur_method cutoff_day
- output_format usage_section summarize_usage
+ add_full_period
+ output_format usage_section summarize_usage usage_mandate
)
],
)
],
@@
-164,7
+174,9
@@
sub calc_recur {
#add a cdr_termination record and the charges
#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,
my $cdr_termination = new FS::cdr_termination {
'acctid' => $cdr->acctid,