[freeside-commits] freeside/FS/FS/cust_main Billing.pm, 1.38.2.3, 1.38.2.4

Mark Wells mark at wavetail.420.am
Sat Nov 26 16:49:42 PST 2011


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

Modified Files:
      Tag: FREESIDE_2_3_BRANCH
	Billing.pm 
Log Message:
correct display of prepay discount info with non-monthly packages, #15040

Index: Billing.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main/Billing.pm,v
retrieving revision 1.38.2.3
retrieving revision 1.38.2.4
diff -u -w -d -r1.38.2.3 -r1.38.2.4
--- Billing.pm	25 Oct 2011 00:05:14 -0000	1.38.2.3
+++ Billing.pm	27 Nov 2011 00:49:40 -0000	1.38.2.4
@@ -253,7 +253,8 @@
 =item freq_override
 
 If set, then override the normal frequency and look for a part_pkg_discount
-to take at that frequency.
+to take at that frequency.  This will exclude any packages that aren't billed
+on a monthly cycle.
 
 =item time
 
@@ -846,6 +847,12 @@
   my $time = $params{'time'} or die "no time specified";
   my (%options) = %{$params{options}};
 
+  if ( $part_pkg->freq ne '1' and ($options{'freq_override'} || 0) > 0 ) {
+    # this should never happen
+    die 'freq_override billing attempted on non-monthly package '.
+      $cust_pkg->pkgnum;
+  }
+
   my $dbh = dbh;
   my $real_pkgpart = $params{real_pkgpart};
   my %hash = $cust_pkg->hash;



More information about the freeside-commits mailing list