[freeside-commits] freeside/FS/FS/cust_main Billing.pm,1.42,1.43

Mark Wells mark at wavetail.420.am
Sat Nov 26 16:46:13 PST 2011


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

Modified Files:
	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.42
retrieving revision 1.43
diff -u -w -d -r1.42 -r1.43
--- Billing.pm	25 Oct 2011 00:04:57 -0000	1.42
+++ Billing.pm	27 Nov 2011 00:46:11 -0000	1.43
@@ -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