diff options
author | mark <mark> | 2011-10-13 07:55:59 +0000 |
---|---|---|
committer | mark <mark> | 2011-10-13 07:55:59 +0000 |
commit | f5749f6de299149275f555a147f3428b7592d14b (patch) | |
tree | bf9e88334e9f8b9bfd1650d51891c6e055ff7c9b /FS/FS/part_pkg | |
parent | 8b9693332912c44ab61efc7c3cb38d204682f7cc (diff) |
fix payment application to term discounts, #14524
Diffstat (limited to 'FS/FS/part_pkg')
-rw-r--r-- | FS/FS/part_pkg/prorate_Mixin.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/FS/FS/part_pkg/prorate_Mixin.pm b/FS/FS/part_pkg/prorate_Mixin.pm index 7d68be0bd..380f0b029 100644 --- a/FS/FS/part_pkg/prorate_Mixin.pm +++ b/FS/FS/part_pkg/prorate_Mixin.pm @@ -98,7 +98,11 @@ sub calc_prorate { my $months = ( ( $self->freq - 1 ) + ($mend-$mnow) / ($mend-$mstart) ); # add a full period if currently billing for a partial period - if ( ( $self->option('add_full_period',1) + # or periods up to freq_override if billing for an override interval + if ( ($param->{'freq_override'} || 0) > 1 ) { + $months += $param->{'freq_override'} - 1; + } + elsif ( ( $self->option('add_full_period',1) or $self->option('prorate_defer_bill',1) ) # necessary and $months < $self->freq ) { $months += $self->freq; |