[freeside-commits] freeside/FS/FS/part_pkg prorate_Mixin.pm, 1.15.2.1, 1.15.2.2

Mark Wells mark at wavetail.420.am
Thu Oct 13 00:56:14 PDT 2011


Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv29903/FS/FS/part_pkg

Modified Files:
      Tag: FREESIDE_2_3_BRANCH
	prorate_Mixin.pm 
Log Message:
fix payment application to term discounts, #14524

Index: prorate_Mixin.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/prorate_Mixin.pm,v
retrieving revision 1.15.2.1
retrieving revision 1.15.2.2
diff -u -w -d -r1.15.2.1 -r1.15.2.2
--- prorate_Mixin.pm	8 Sep 2011 22:09:57 -0000	1.15.2.1
+++ prorate_Mixin.pm	13 Oct 2011 07:56:12 -0000	1.15.2.2
@@ -98,7 +98,11 @@
     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;



More information about the freeside-commits mailing list