projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bug fix for discounts on setup fees, RT11512
[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
0666d79
..
3723629
100644
(file)
--- a/
FS/FS/part_pkg/cdr_termination.pm
+++ b/
FS/FS/part_pkg/cdr_termination.pm
@@
-16,15
+16,8
@@
tie my %temporalities, 'Tie::IxHash',
%info = (
'name' => 'VoIP rating of CDR records for termination partners.',
'shortname' => 'VoIP/telco CDR termination',
%info = (
'name' => 'VoIP rating of CDR records for termination partners.',
'shortname' => 'VoIP/telco CDR termination',
+ 'inherit_fields' => [ 'global_Mixin' ],
'fields' => {
'fields' => {
-
- 'setup_fee' => { 'name' => 'Setup fee for this package',
- 'default' => 0,
- },
- 'recur_fee' => { 'name' => 'Base recurring fee for this package',
- 'default' => 0,
- },
-
#'cdr_column' => { 'name' => 'Column from CDR records',
# 'type' => 'select',
# 'select_enum' => [qw(
#'cdr_column' => { 'name' => 'Column from CDR records',
# 'type' => 'select',
# 'select_enum' => [qw(
@@
-49,11
+42,6
@@
tie my %temporalities, 'Tie::IxHash',
'select_options' => \%temporalities,
},
'select_options' => \%temporalities,
},
- 'unused_credit' => { 'name' => 'Credit the customer for the unused portion'.
- ' of service at cancellation',
- 'type' => 'checkbox',
- },
-
'cutoff_day' => { 'name' => 'Billing Day (1 - 28) for prorating or '.
'subscription',
'default' => '1',
'cutoff_day' => { 'name' => 'Billing Day (1 - 28) for prorating or '.
'subscription',
'default' => '1',
@@
-92,8
+80,7
@@
tie my %temporalities, 'Tie::IxHash',
},
#cdr_column
'fieldorder' => [qw(
},
#cdr_column
'fieldorder' => [qw(
- setup_fee recur_fee
- recur_temporality unused_credit recur_method cutoff_day
+ recur_temporality recur_method cutoff_day
add_full_period
output_format usage_section summarize_usage usage_mandate
)
add_full_period
output_format usage_section summarize_usage usage_mandate
)
@@
-116,7
+103,7
@@
sub calc_recur {
my $last_bill = $cust_pkg->get('last_bill'); #->last_bill falls back to setup
return 0
my $last_bill = $cust_pkg->get('last_bill'); #->last_bill falls back to setup
return 0
- if $self->
option('recur_temporality', 1)
eq 'preceding'
+ if $self->
recur_temporality
eq 'preceding'
&& ( $last_bill eq '' || $last_bill == 0 );
# termination calculations
&& ( $last_bill eq '' || $last_bill == 0 );
# termination calculations