X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main%2FBilling.pm;h=078908e6d92cea051f60a74a28c73e199bda3b84;hb=7f5e32275a5a2674fd1d220cd651b222b9831476;hp=dca4ab7c73b316877a61a7ef71c16bdd6c61027f;hpb=e69bb919e1ff6cad3047058b556875bbf493378f;p=freeside.git diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm index dca4ab7c7..078908e6d 100644 --- a/FS/FS/cust_main/Billing.pm +++ b/FS/FS/cust_main/Billing.pm @@ -253,7 +253,9 @@ charges, etc. =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 is appropriate only when the normal +frequency for all packages is monthly, and is an error otherwise. Use +C to limit the set of packages included in billing. =item time @@ -846,6 +848,12 @@ sub _make_lines { 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;