[freeside-commits] freeside/FS/FS/part_pkg prorate_Mixin.pm, 1.5.2.3, 1.5.2.4
Mark Wells
mark at wavetail.420.am
Mon Jan 10 16:56:27 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv18208/FS/FS/part_pkg
Modified Files:
Tag: FREESIDE_2_1_BRANCH
prorate_Mixin.pm
Log Message:
add_full_period fix, RT#9874
Index: prorate_Mixin.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/prorate_Mixin.pm,v
retrieving revision 1.5.2.3
retrieving revision 1.5.2.4
diff -u -w -d -r1.5.2.3 -r1.5.2.4
--- prorate_Mixin.pm 8 Jan 2011 01:40:32 -0000 1.5.2.3
+++ prorate_Mixin.pm 11 Jan 2011 00:56:25 -0000 1.5.2.4
@@ -35,9 +35,9 @@
Takes all the arguments of calc_recur, followed by a day of the month
to prorate to (which must be <= 28). Calculates a prorated charge from
the $sdate to that day, and sets the $sdate and $param->{months} accordingly.
+base_recur() will be called to determine the base price per billing cycle.
Options:
-- recur_fee: The charge to use for a complete billing period.
- add_full_period: Bill for the time up to the prorate day plus one full
billing period after that.
- prorate_round_day: Round the current time to the nearest full day,
@@ -90,8 +90,8 @@
my $permonth = $charge / $self->freq;
my $months = ( ( $self->freq - 1 ) + ($mend-$mnow) / ($mend-$mstart) );
- if ( $self->option('add_full_period',1) ) {
- # charge a full period in addition to the partial month
+ # add a full period if currently billing for a partial period
+ if ( $self->option('add_full_period',1) and $months < $self->freq ) {
$months += $self->freq;
$$sdate = $self->add_freq($mstart);
}
More information about the freeside-commits
mailing list